jQuery evaluates a script tag before the HTML is appended to the DOM?
Can someone take a look at the following?
http://dev.jquery.com/ticket/1725
I don't understand lines 402 and 403 of jquery-1.0.2.js:
402: if ( !evalScript(0, elem) )
403: fn.call( obj, elem );
where "fn" can be either "appendChild" or "insertBefore". If it's
going to insert HTML into the DOM, why does it have to try to evaluate
first and then append it into the DOM. The problem is that "elem" can
contain script tags that work under the assumption that HTML that is
also contained in elem will be added to the DOM. But in this case it
won't happen because "evalScript" will execute before "fn".
Any ideas the logic behind these lines?
Why it couldn't be something just like:
402: fn.call( obj, elem );
403: evalScript(0, elem);
Thanks!
Carlos