[whatwg] Should script run if it comes from a HTML fragment?
rniwa at webkit.org
Mon May 21 14:43:48 PDT 2012
On Sat, May 19, 2012 at 4:59 PM, Ryosuke Niwa <rniwa at webkit.org> wrote:
> 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 at 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:
>> ...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:
> Should we also unmark it as parser-inserted in this case?
I have changed WebKit's behavior based on this assumption:
More information about the whatwg