FirstLegoLeague / displaySystem

Set of display tools
https://firstlegoleague.github.io/displaySystem/
4 stars 7 forks source link

add script loading for modules #22

Closed Jheronymus closed 6 years ago

Jheronymus commented 8 years ago

modules can have their unique stylesheets included. Perhaps something similar can be made to include additional script libraries. The current script loader needs to loop over all modules to make sure these scripts are loaded first.

rikkertkoppes commented 6 years ago

This is now added. A module can call displaySystem.loadScript(src, callback) and behave accordingly. For example, it can delay its own initialization until the callback

Css files can also be loaded that way, but we don't have a callback for that

For an example, see the emojione module