[whatwg] Should script run if it comes from a HTML fragment?
rniwa at webkit.org
Thu Nov 11 16:34:59 PST 2010
I'm working on the WebKit bug 12234 - Using createContextualFragment to
insert a <script> does not cause the script to
While investigating the issue, the following part of HTML5 spec came to my
*10.2.5.7 The "in head" insertion
- *A start tag whose tag name is "script"*
1. If the parser was originally created for the HTML fragment parsing
algorithm, then mark the script element as "already started". (fragment
Since 10.4 Parsing HTML
not special case the script element, this seem to imply that we never
execute scripts inserted by the HTML fragment parsing algorithm. Am I
To give you more concrete example, should the following markup show the
alert or not?
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the whatwg