Better fix for #407 issue
This commit is contained in:
parent
26cda0c1e5
commit
15a30ba90c
|
@ -123,8 +123,14 @@ jQuery.fn.extend({
|
||||||
if ( this.src )
|
if ( this.src )
|
||||||
// for some weird reason, it doesn't work if the callback is ommited
|
// for some weird reason, it doesn't work if the callback is ommited
|
||||||
jQuery.getScript( this.src );
|
jQuery.getScript( this.src );
|
||||||
else
|
else {
|
||||||
eval.call( window, this.text || this.textContent || this.innerHTML || "" );
|
// TODO extract into $.eval
|
||||||
|
var data = this.text || this.textContent || this.innerHTML || "";
|
||||||
|
if (window.execScript)
|
||||||
|
window.execScript( data );
|
||||||
|
else
|
||||||
|
window.setTimeout( data, 0 );
|
||||||
|
}
|
||||||
}).end();
|
}).end();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -682,6 +688,7 @@ jQuery.extend({
|
||||||
data = type == "xml" || data ? r.responseXML : r.responseText;
|
data = type == "xml" || data ? r.responseXML : r.responseText;
|
||||||
|
|
||||||
// If the type is "script", eval it´in global context
|
// If the type is "script", eval it´in global context
|
||||||
|
// TODO extract as $.eval
|
||||||
if ( type == "script" ) {
|
if ( type == "script" ) {
|
||||||
if (window.execScript)
|
if (window.execScript)
|
||||||
window.execScript( data );
|
window.execScript( data );
|
||||||
|
|
Loading…
Reference in a new issue