|
|
|
|
|
by shoebappa
4649 days ago
|
|
We're doing something similar with YepNope that is included in Modernizr but it's not as simple as yours. We ran into problems where if there were multiple elements on the page with that dependency (usually a jquery plugin), only one would end up getting initialized. We ended up coming up with a complicated queuing system that queues up all of the initialization requests when it detects that it is in the process of being loaded, and fires for each in the queue after the dependency is loaded. I'm definitely curious to look into your method in terms of multiple items that need to each be initialized and how this is handled with your context require method or require in general. |
|