bendman / amd-kit

A simple and easy to use and understand AMD loader for more modular sites.
http://bendman.github.com/amd-kit/
1 stars 0 forks source link

Add hook for forcing preload of scripts #2

Open bendman opened 12 years ago

bendman commented 12 years ago

Add a hook for preloading scripts immediately, without any callback. Use as a just-in-time loading mechanism, meant to be triggered by JS events.

bendman commented 12 years ago

obviously this hook will need to go through the module handler, as this will generate the observer hooks for dependent modules, and remove the possibility accidentally loading the script more than once

bendman commented 11 years ago

maybe give require a method Require.fetch(filename);

I need to build a decent test case for extended functionality on a module over time, where the individual modules are loaded progressively by fetching just before the user can access the functionality based on user interaction.