Peter Michaux wrote: > On 7/21/06, Ryan Gahl <[EMAIL PROTECTED]> wrote: >> scripts inserted via innerHTML are not executed, so this ensures any >> scripts >> actually get executed > > The scripts are evaluated when the timeout expires. What I'm > interested in is why they need to be stripped when the HTML is > inserted. Most browsers don't care if the script elements are inside > the html when using innerHTML. > > Netscape 6 automatically evaluates scripts when using innerHTML. It is > the only browser I know of that does this. I wonder if that is the > reason the scripts are stripped. Netscape 6 is pretty old now.
That sounds like a reasonable reason to me: Strip them off so some browsers don't execute them, since others browsers won't. Then execute with a delay since other browsers won't update the DOM right away. Now it could be made slightly faster if you handled it differently for each browser, but since there's a simple way that works for all of them I can see why it was done that way. -- Michael Peters Developer Plus Three, LP _______________________________________________ Rails-spinoffs mailing list Rails-spinoffs@lists.rubyonrails.org http://lists.rubyonrails.org/mailman/listinfo/rails-spinoffs