git.asbjorn.biz
/
jquery.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (from parent 1:
26cda0c
)
Better fix for #407 issue
author
Jörn Zaefferer
<joern.zaefferer@gmail.com>
Tue, 21 Nov 2006 09:14:29 +0000
(09:14 +0000)
committer
Jörn Zaefferer
<joern.zaefferer@gmail.com>
Tue, 21 Nov 2006 09:14:29 +0000
(09:14 +0000)
src/ajax/ajax.js
patch
|
blob
|
history
diff --git
a/src/ajax/ajax.js
b/src/ajax/ajax.js
index
b8ccdd6
..
efd7ae2
100644
(file)
--- a/
src/ajax/ajax.js
+++ b/
src/ajax/ajax.js
@@
-123,8
+123,14
@@
jQuery.fn.extend({
if ( this.src )
// for some weird reason, it doesn't work if the callback is ommited
jQuery.getScript( this.src );
if ( this.src )
// for some weird reason, it doesn't work if the callback is ommited
jQuery.getScript( this.src );
- else
- eval.call( window, this.text || this.textContent || this.innerHTML || "" );
+ else {
+ // 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;
// If the type is "script", eval it´in global context
data = type == "xml" || data ? r.responseXML : r.responseText;
// If the type is "script", eval it´in global context
+ // TODO extract as $.eval
if ( type == "script" ) {
if (window.execScript)
window.execScript( data );
if ( type == "script" ) {
if (window.execScript)
window.execScript( data );