I found the change to jQuery a bit verbose: if (window.execScript){ window.execScript(this.text || this.textContent || this.innerHTML || ""); } else { eval.call
( window, this.text || this.textContent || this.innerHTML || "" ); }Where:1. (this.text |
er, "apply" can't be called for execScript.BritoOn 9/3/06, Francisco Brito <[EMAIL PROTECTED]
> wrote:eval can't be called for execScript, but eval is a method of the window you want your scripts evaluated on. That's why I was using
self.eval:(window.execScript || self.eval)(this.text || this.text
eval can't be called for execScript, but eval is a method of the window you want your scripts evaluated on. That's why I was using self.eval:(window.execScript || self.eval)(this.text || this.textContent || this.innerHTML
|| "");BritoOn 9/2/06, John Resig <[EMAIL PROTECTED]> wrote:
I created a tic
I created a ticket for this issue here:
http://proj.jquery.com/dev/bugs/bug/171/
I'll get to it ASAP.
--John
On 9/1/06, ashutosh bijoor <[EMAIL PROTECTED]> wrote:
> That's IT, Francisco!
> That does the trick.
> In jquery svn, we need to change the following lines:
> Line number 4910:
>
>
That's IT, Francisco!That does the trick.In jquery svn, we need to change the following lines:Line number 4910: eval.call( window, this.text || this.textContent || this.innerHTML || "" );
should be changed to {var src="" this.text || this.textContent || this.innerHTML || "";
The setTimeout trick is not because innerHTML is not defined, but to avoid the eval. eval has its own execution context which is the same as the containing block. But code passed to setTimeout executes in global context.
I read about this fix at http://nerd.newburyportion.com/2006/07/going-globalBu
This topic actually showed up just recently on the prototype list.
Some said that they use a setTimeout+eval to insure global scope but
others said that prototype isn't actually doing it right for that work
properly. Instead I believe they are just using the setTimeout to
avoid an IE issue where th
Oops that should have been window.execScript and not window.evalScript -AshutoshOn 9/1/06, ashutosh bijoor <[EMAIL PROTECTED]
> wrote:That's IT, Francisco!That does the trick.In jquery svn, we need to change the following lines:
Line number 4910: eval.call( window, this.text || t
> The solution suggested earlier for executing javascript code
> embedded in HTML returned by an ajax call by using
> eval.call(window,...) works great in FF, but not in IE6.
> How can we change the execution context of eval?
Can you change the way the function is declared?
myfunc = f
Use window.execScript for IE.(some switch would be needed, such as:)(window.execScript || self.eval)(script);cheersBritoOn 9/1/06,
ashutosh bijoor <[EMAIL PROTECTED]> wrote:
The solution suggested earlier for executing _javascript_ code embedded in HTML returned by an ajax call by using eval.call(
The solution suggested earlier for executing _javascript_ code embedded in HTML returned by an ajax call by using eval.call(window,...) works great in FF, but not in IE6.eval.call(window,jscode) still executes in the context of the block in which eval is called. Hence, any functions that are define
11 matches
Mail list logo