Via
Via copied to clipboard
Scripts ordering
Will be nice to have an ability to order scripts to prioritize loading by naming it.
For example:
1. framework
2. plugin
3. plugin
Other script
Just wrote toolbar (script 1) and trying to add buttons (scripts 2, 3) in some order.
For now, solution is to wrap "plugin" scripts with:
window.setTimeout(function() {
//...
}, 42);
where 42 is priority =)
If you have the order of these scripts, why not merge them into a new script in order?
Modularity is better. Small scripts editing is simpler on smartphone than huge.
Also, I think implementing this feature is cheap, but it brings:
- organizing "user" scripts
- controllable loading order
But your solution will work better, than setting timeouts.
I also think you should merge scripts. A script is more like a class than a function.