MCPcopy Create free account
hub / github.com/BlaNKtext/webosu / getScriptData

Function getScriptData

js/lib/require.js:1229–1243  ·  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

1227 * @returns {Object}
1228 */
1229 function getScriptData(evt) {
1230 //Using currentTarget instead of target for Firefox 2.0's sake. Not
1231 //all old browsers will be supported, but this one was easy enough
1232 //to support and still makes sense.
1233 var node = evt.currentTarget || evt.srcElement;
1234
1235 //Remove the listeners once here.
1236 removeListener(node, context.onScriptLoad, 'load', 'onreadystatechange');
1237 removeListener(node, context.onScriptError, 'error');
1238
1239 return {
1240 node: node,
1241 id: node && node.getAttribute('data-requiremodule')
1242 };
1243 }
1244
1245 function intakeDefines() {
1246 var args;

Callers 1

newContextFunction · 0.85

Calls 1

removeListenerFunction · 0.85

Tested by

no test coverage detected