3 ], function( document ) {
6 var preservedScriptAttributes = {
13 function DOMEval( code, doc, node ) {
14 doc = doc || document;
17 script = doc.createElement( "script" );
21 for ( i in preservedScriptAttributes ) {
23 script[ i ] = node[ i ];
24 } else if ( node.getAttribute( i ) ) {
26 // Support: Firefox 64+, Edge 18+
27 // Some browsers don't support the "nonce" property on scripts.
28 // On the other hand, just using `setAttribute` & `getAttribute`
29 // is not enough as `nonce` is no longer exposed as an attribute
30 // in the latest standard.
31 // See https://github.com/whatwg/html/issues/2369
32 script.setAttribute( i, node.getAttribute( i ) );
36 doc.head.appendChild( script ).parentNode.removeChild( script );