- Issue created by @apaderno
The JavaScript Example module shows how to load a JavaScript file before another one, by setting the weight
property for each file.
That is a bad example, as the comments say, but it is also not necessary: Drupal core includes the loadjs
library, which exactly for running JavaScript code once a file has been loaded from the browser. It is only used by Drupal.ajax
, but the code used from Drupal core can be used as example to write our code.
As to show how to use a property for assets files part of a library, it would be sufficient to use attributes
and id
.
Active
4.0
JavaScript Example