Re: [whatwg] Should script run if it comes from a HTML fragment?

Sorry, I got distracted by other work. Now that we're talking about
document.parse, I'm determined to dedicate some cycles on this.

On Wed, Feb 9, 2011 at 1:26 PM, Ian Hickson <ian@hixie.ch> wrote:

> On Thu, 11 Nov 2010, Ryosuke Niwa wrote:
> >
> > I'm working on the WebKit bug 12234 - Using createContextualFragment to
> > insert a <script> does not cause the script to execute
> > <https://bugs.webkit.org/show_bug.cgi?id=12234>. [...]
>
> This thread pretty much resolved itself, but for the record:
>
> * createContextualFragment() is here:
>
> http://html5.org/specs/dom-parsing.html#dom-range-createcontextualfragment
>  ...and re-enables scripts before returning them; the parser doesn't
>  execute them synchronously.
>
> * innerHTML doesn't run scripts and they are inserted disabled.
>

It appears that we have a slight bug there. While we unmark the script
element as already-started, we don't unmark it as parser-inserted. So we
end up never "preparing" the script element per:
http://www.whatwg.org/specs/web-apps/current-work/multipage/scripting-1.html#parser-inserted

Should we also unmark it as parser-inserted in this case?

- Ryosuke

Received on Sunday, 20 May 2012 00:00:46 UTC