MCPcopy Create free account
hub / github.com/jquery/jquery-ui / getScriptData

Function getScriptData

external/requirejs/require.js:1203–1217  ·  view source on GitHub ↗

* Given an event from a script node, get the requirejs info from it, * and then removes the event listeners on the node. * @param {Event} evt * @returns {Object}

(evt)

Source from the content-addressed store, hash-verified

1201 * @returns {Object}
1202 */
1203 function getScriptData(evt) {
1204 //Using currentTarget instead of target for Firefox 2.0's sake. Not
1205 //all old browsers will be supported, but this one was easy enough
1206 //to support and still makes sense.
1207 var node = evt.currentTarget || evt.srcElement;
1208
1209 //Remove the listeners once here.
1210 removeListener(node, context.onScriptLoad, 'load', 'onreadystatechange');
1211 removeListener(node, context.onScriptError, 'error');
1212
1213 return {
1214 node: node,
1215 id: node && node.getAttribute('data-requiremodule')
1216 };
1217 }
1218
1219 function intakeDefines() {
1220 var args;

Callers 1

newContextFunction · 0.85

Calls 1

removeListenerFunction · 0.85

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…