loge.hixie.ch

Hixie's Natural Log

2004-03-12 14:58 UTC New arch nemesis (still a kind of script, though)

The reason I nominally joined the SVG working group is so that I can remain one of the editor of the XBL spec (draft basic version, draft complete version) while we publish it through the SVG working group. As part of this, I've been spending the week so far working mostly on editing that spec.

Doing this, I ran into some edge cases that I need to define. If you create an html:script element, then insert it into a document, should it be evaluated? If you then take this element out of the document, and reinsert it, should it be evaluated? If you take this element and clone it, then insert the clone, should it be evaluated? If you take this element's parent node, and rename it using renameNode(), causing the children (including the script element) to be removed from the document then readded, should the script get reevaluated? What about if an ancestor is adopted into another document, causing ownerDocument to change? And what script context should be used in that case? What if the node doesn't have the script included inline, but uses a link to an external file instead?

I have a headache.