This is an archived snapshot of W3C's public bugzilla bug tracker, decommissioned in April 2019. Please see the home page for more details.

Bug 5997 - Define script execution for XHTML5
Summary: Define script execution for XHTML5
Alias: None
Product: HTML WG
Classification: Unclassified
Component: pre-LC1 HTML5 spec (editor: Ian Hickson) (show other bugs)
Version: unspecified
Hardware: All All
: P2 normal
Target Milestone: ---
Assignee: Ian 'Hixie' Hickson
QA Contact: HTML WG Bugzilla archive list
Keywords: NoReply
Depends on:
Reported: 2008-08-28 12:02 UTC by Henri Sivonen
Modified: 2010-10-04 14:31 UTC (History)
4 users (show)

See Also:


Description Henri Sivonen 2008-08-28 12:02:09 UTC
The spec should define script execution for XHTML5. It would be good to use the same definition for running SVG scripts in both XHTML5 and HTML5.

Based on the demo , I suggest the following, which seems to be what Gecko and WebKit do with both XHTML and SVG scripts:
 1) When the DOM builder gets a start element event, append element node. Don't run script yet.
 2) When the DOM builder gets a characters event, append characters to the current node.
 3) When the DOM builder gets an end element event, pop. If the popped element was 'script' in the or namespaces, run the concatenation of child text nodes as script.

Note: Opera runs the concatenation of child descendant nodes instead, which makes text that is descendant of more than one script element run many times.
Comment 1 Ian 'Hixie' Hickson 2008-12-29 23:21:09 UTC
The spec says:

# When an XML parser creates a script element, it must be marked as being "parser-inserted".
# When the element's end tag is parsed, the user agent must run the script element.

I can't define what the processing model for SVG should be, that would need to be in the SVG spec.
Comment 2 Maciej Stachowiak 2010-03-14 13:15:37 UTC
This bug predates the HTML Working Group Decision Policy.

If you are satisfied with the resolution of this bug, please change the state of this bug to CLOSED. If
you have additional information and would like the editor to reconsider, please reopen this bug. If you would like to escalate the issue to the full HTML Working Group, please add the TrackerRequest keyword to this bug, and suggest title and text for the tracker issue; or you may create a tracker issue yourself, if you are able to do so. For more details, see this document:

This bug is now being moved to VERIFIED. Please respond within two weeks. If this bug is not closed, reopened or escalated within two weeks, it may be marked as NoReply and will no longer be considered a pending comment.