Re: [webcomponents] Template element parser changes => Proposal for adding DocumentFragment.innerHTML

On Wed, 25 Apr 2012 21:39:53 +0200, Rafael Weinstein <rafaelw@google.com>  
wrote:

> Here's the approach for picking the implied context element:
>
> Let the first start tag token imply the context element. The start tag
> => implied context element is as follows:
>
> caption, colgroup, thead, tbody, tfoot => HTMLTableElement
> tr => HTMLTableBodyElement
> col => HTMLColGroupElement
> td, th => HTMLTableRowElement
> head, body => HTMLHTMLElement
> rp, rt => HTMLRubyElement
> Any other HTML tagName => HTMLBodyElement

Isn't this one redundant with the last step?

> Any other SVG tagName => SVGElement
> Any other MathML tagName => MathElement

What are these two, exactly? The parser currently doesn't have a list of  
SVG/MathML tag names, and the SVG WG didn't like it when it was proposed  
to use a fixed list of SVG tag names for parsing SVG in text/html, IIRC.

Also note that innerHTML on non-HTML elements currently always parses in  
the "in body" insertion mode. I'd like to see that fixed before we try to  
support foreign content in contextless innerHTML.

https://www.w3.org/Bugs/Public/show_bug.cgi?id=16635

> Any other tagName => HTMLBodyElement

-- 
Simon Pieters
Opera Software

Received on Thursday, 26 April 2012 08:27:10 UTC