Labs/Jetpack/JEP/25: Difference between revisions

→‎Loader Objects: added docs for Loader.require().
(added docs, moved from JEP 28)
(→‎Loader Objects: added docs for Loader.require().)
Line 134: Line 134:


If ''code'' is a string of JavaScript code, this is a convenient shorthand for <tt>Loader.runScript({contents: code}}</tt>.
If ''code'' is a string of JavaScript code, this is a convenient shorthand for <tt>Loader.runScript({contents: code}}</tt>.
<tt>Loader.'''require'''(''module'')</tt>
This loads the given module name using the standard <tt>require()</tt> semantics and returns the loaded module.


=== Functions ===
=== Functions ===
874

edits