Re: DOM-Parsing innerHTML/outerHTML and namespaces

"Simon Pieters" <[email protected]>
Newsgroups gmane.comp.web.dom.general
Message-ID <[email protected]>
On Tue, 11 Nov 2014 22:05:00 +0100, Boris Zbarsky <[email protected]> wrote:

> On 11/11/14, 3:55 PM, Simon Pieters wrote:
>> https://html.spec.whatwg.org/multipage/syntax.html#html-fragment-parsing-algorithm
>> (context is <g>)
>
> Agreed.
>
>> https://html.spec.whatwg.org/multipage/syntax.html#adjusted-current-node
>> (adjusted current node is <g>)
>
> Why?  This is the step I'm not seeing in the spec.

It's in the definition pointed to above.

"The adjusted current node is the context element if the stack of open  
elements has only one element in it and the parser was created by the HTML  
fragment parsing algorithm; otherwise, the adjusted current node is the  
current node."

context = <g>
stack of open elements has only one element in it = true
the parser was created by the HTML fragment parsing algorithm = true

Hence adjusted current node is <g>.

-- 
Simon Pieters
Opera Software
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.