Permalink
Please sign in to comment.
Browse files
Core: do not expose second argument of the `jQuery.globalEval`
Closes jquery/api.jquery.com#831 Closes gh-2718
- Loading branch information...
Showing
with
23 additions
and 10 deletions.
- +6 −8 src/core.js
- +14 −0 src/core/DOMEval.js
- +3 −2 src/manipulation.js
14
src/core.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; | ||
| +} ); |
0 comments on commit
6680c1b