Extending the handler objects to assign a weight to each function, allowing us to assign more or less importance to a particular function.
Use case
If module 1 and module 2 are inter-related, let's say module 2 has a function that needs to be called before module 1 will work, but their respective scripts are loaded in the wrong order in the DOM:
module1.js
module2.js
The current solution would be to make sure Drupal is loading module2.js before module1.js. The proposed solution would allow us to do something like this:
For each of the function calling loops in e3.doc.ready, we would need to take each function in the respective object and reorder them according to their weight value if one is defined, otherwise assume 0.
Extending the handler objects to assign a weight to each function, allowing us to assign more or less importance to a particular function.
Use case
If module 1 and module 2 are inter-related, let's say module 2 has a function that needs to be called before module 1 will work, but their respective scripts are loaded in the wrong order in the DOM: module1.js module2.js
The current solution would be to make sure Drupal is loading module2.js before module1.js. The proposed solution would allow us to do something like this:
For each of the function calling loops in e3.doc.ready, we would need to take each function in the respective object and reorder them according to their weight value if one is defined, otherwise assume 0.