diff options
author | Oleg Gaidarenko <markelog@gmail.com> | 2015-11-14 01:28:16 +0300 |
---|---|---|
committer | Oleg Gaidarenko <markelog@gmail.com> | 2015-12-02 17:09:01 +0300 |
commit | 6680c1b29ea79bf33ac6bd31578755c7c514ed3e (patch) | |
tree | 7adc79e38ca230e9ddf0090145aa55491d1ddb29 /src/core/DOMEval.js | |
parent | e077ffb083743f4a4b990f586c9d25d787e7b417 (diff) | |
download | jquery-6680c1b29ea79bf33ac6bd31578755c7c514ed3e.tar.gz jquery-6680c1b29ea79bf33ac6bd31578755c7c514ed3e.zip |
Core: do not expose second argument of the `jQuery.globalEval`
Closes jquery/api.jquery.com#831
Closes gh-2718
Diffstat (limited to 'src/core/DOMEval.js')
-rw-r--r-- | src/core/DOMEval.js | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/src/core/DOMEval.js b/src/core/DOMEval.js new file mode 100644 index 000000000..222b0ca2a --- /dev/null +++ b/src/core/DOMEval.js @@ -0,0 +1,14 @@ +define( [ + "../var/document" +], function( document ) { + function DOMEval( code, doc ) { + doc = doc || document; + + var script = doc.createElement( "script" ); + + script.text = code; + doc.head.appendChild( script ).parentNode.removeChild( script ); + } + + return DOMEval; +} ); |