A user account is required in order to edit this wiki, but we've had to disable public user registrations due to spam.

To request an account, ask an autoconfirmed user on Chat (such as one of these permanent autoconfirmed members).

Talk:Dynamic Script Execution Order: Difference between revisions

From WHATWG Wiki
Jump to navigation Jump to search
(discussion page)
 
(What about CommonJS / RequireJS?)
Line 1: Line 1:
Please discuss the proposal here. All informal feedback is welcomed, and when it's appropriate, please add content to the main page.
Please discuss the proposal here. All informal feedback is welcomed, and when it's appropriate, please add content to the main page.
== What about CommonJS / RequireJS? ==
I'm not sure we need to complicate the HTML or browser engines in order to satisfy the advanced use cases.  To me it seems that the JavaScript langauge itself could abstract the requirements and let the browser vendors implement whatever solution they see fit.  Specifically, if JavaScript provided the define() and require() calls proposed in the CommonJS "specifications" (and implemented by [http://requirejs.org/docs/api.html RequireJS], [http://svn.dojotoolkit.org/src/dojo/trunk/_base/_loader/loader.js dojo (trunk)], and others *Yabble?), then browsers could just load and evaluate scripts as fast as possible without regard to script execution order. 
This would solve all of the problems except for the current inability to use loaders like LABjs in FF4 or webkit.  To solve that problem, we should consider keeping the existing functionality or triggering the deprecated functionality when needed.

Revision as of 21:25, 1 November 2010

Please discuss the proposal here. All informal feedback is welcomed, and when it's appropriate, please add content to the main page.


What about CommonJS / RequireJS?

I'm not sure we need to complicate the HTML or browser engines in order to satisfy the advanced use cases. To me it seems that the JavaScript langauge itself could abstract the requirements and let the browser vendors implement whatever solution they see fit. Specifically, if JavaScript provided the define() and require() calls proposed in the CommonJS "specifications" (and implemented by RequireJS, dojo (trunk), and others *Yabble?), then browsers could just load and evaluate scripts as fast as possible without regard to script execution order.

This would solve all of the problems except for the current inability to use loaders like LABjs in FF4 or webkit. To solve that problem, we should consider keeping the existing functionality or triggering the deprecated functionality when needed.