Please special-case "html" as the context of Range.createContextualFragment when the doc is an HTML doc

For a future revision of DOM Range:

Please specify that when the document associated with Range is an HTML document (has its HTMLness bit set per HTML5) and the context node (startContainer of the Range) has local name "html" in the XHTML namespace, the context passed to the HTML fragment parsing algorithm should be "body" in the XHTML namespace instead. This is required for compat with existing scripts.

See https://bugzilla.mozilla.org/show_bug.cgi?id=585819 and dependencies/duplicates.

(Also, if the document is an HTML document and the range doesn't have an identifiable context element node even after walking the parent chain, the context passed to the HTML fragment parsing algorithm should be "body" in the XHTML namespace. I don't know DOM Range well enough to say how this situation can arise.)

-- 
Henri Sivonen
hsivonen@iki.fi
http://hsivonen.iki.fi/

Received on Monday, 6 September 2010 08:21:31 UTC