OSDN Git Service

Modify the dependency on path
[bytom/vapor.git] / tools / side_chain_tool / web / node_modules / jquery / src / core / DOMEval.js
1 define( [
2         "../var/document"
3 ], function( document ) {
4         "use strict";
5
6         var preservedScriptAttributes = {
7                 type: true,
8                 src: true,
9                 noModule: true
10         };
11
12         function DOMEval( code, doc, node ) {
13                 doc = doc || document;
14
15                 var i,
16                         script = doc.createElement( "script" );
17
18                 script.text = code;
19                 if ( node ) {
20                         for ( i in preservedScriptAttributes ) {
21                                 if ( node[ i ] ) {
22                                         script[ i ] = node[ i ];
23                                 }
24                         }
25                 }
26                 doc.head.appendChild( script ).parentNode.removeChild( script );
27         }
28
29         return DOMEval;
30 } );