MCPcopy Create free account
hub / github.com/dtmilano/AndroidViewClient / DOMEval

Function DOMEval

docs/_static/jquery-3.6.0.js:107–134  ·  view source on GitHub ↗
( code, node, doc )

Source from the content-addressed store, hash-verified

105 };
106
107 function DOMEval( code, node, doc ) {
108 doc = doc || document;
109
110 var i, val,
111 script = doc.createElement( "script" );
112
113 script.text = code;
114 if ( node ) {
115 for ( i in preservedScriptAttributes ) {
116
117 // Support: Firefox 64+, Edge 18+
118 // Some browsers don't support the "nonce" property on scripts.
119 // On the other hand, just using `getAttribute` is not enough as
120 // the `nonce` attribute is reset to an empty string whenever it
121 // becomes browsing-context connected.
122 // See https://github.com/whatwg/html/issues/2369
123 // See https://html.spec.whatwg.org/#nonce-attributes
124 // The `node.getAttribute` check was added for the sake of
125 // `jQuery.globalEval` so that it can fake a nonce-containing node
126 // via an object.
127 val = node[ i ] || node.getAttribute && node.getAttribute( i );
128 if ( val ) {
129 script.setAttribute( i, val );
130 }
131 }
132 }
133 doc.head.appendChild( script ).parentNode.removeChild( script );
134 }
135
136
137function toType( obj ) {

Callers 2

jquery-3.6.0.jsFile · 0.85
domManipFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected