mirror of
https://github.com/jquery/jquery.git
synced 2026-04-20 03:01:22 -04:00
Core: do not expose second argument of the jQuery.globalEval
Closes jquery/api.jquery.com#831 Closes gh-2718
This commit is contained in:
14
src/core.js
14
src/core.js
@@ -8,8 +8,10 @@ define( [
|
||||
"./var/class2type",
|
||||
"./var/toString",
|
||||
"./var/hasOwn",
|
||||
"./var/support"
|
||||
], function( arr, document, slice, concat, push, indexOf, class2type, toString, hasOwn, support ) {
|
||||
"./var/support",
|
||||
"./core/DOMEval"
|
||||
], function( arr, document, slice, concat,
|
||||
push, indexOf, class2type, toString, hasOwn, support, DOMEval ) {
|
||||
|
||||
var
|
||||
version = "@VERSION",
|
||||
@@ -258,12 +260,8 @@ jQuery.extend( {
|
||||
},
|
||||
|
||||
// Evaluates a script in a global context
|
||||
globalEval: function( code, context ) {
|
||||
context = context || document;
|
||||
var script = context.createElement( "script" );
|
||||
|
||||
script.text = code;
|
||||
context.head.appendChild( script ).parentNode.removeChild( script );
|
||||
globalEval: function( code ) {
|
||||
DOMEval( code );
|
||||
},
|
||||
|
||||
// Convert dashed to camelCase; used by the css and data modules
|
||||
|
||||
Reference in New Issue
Block a user