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

Ian Hickson ian at hixie.ch
Wed Feb 9 13:26:45 PST 2011

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.

On Sat, 13 Nov 2010, Henri Sivonen wrote:
> Hixie wrote the relevant part of the spec without taking 
> createContextualFragment into account, so you shouldn't read too much 
> into what the spec says now. Similar overlooking a part of the platform 
> when considering the interactions has occurred a couple of time with how 
> HTML5 integrates with XSLT, too.

Indeed. I am not omniscient. :-)

Ian Hickson               U+1047E                )\._.,--....,'``.    fL
http://ln.hixie.ch/       U+263A                /,   _.. \   _\  ;`._ ,.
Things that are impossible just take longer.   `._.-(,_..'--(,_..'`-.;.'

More information about the whatwg mailing list