Open cycomachead opened 7 years ago
That last part is mostly done.
Perhaps we can define a module syntax?
llab.modules = {
curriculum: {
dependencies: ['jQuery', 'library'],
path: 'src/curriculum.js',
onLoad: function() {},
...,
},
};
This feels like reinventing the wheel. Maybe a build system is still just easier. :/
Then we can have a meta onLoad function that checks if dependencies are ready and if so calls the onLoad for that module. Then if the dependencies aren't ready, it can create callbacks.
Lunch Time thoughts..
onload
for each script, that calls the section loaded function, and the load next section function if everything is goodMore difficult stuff: