Re: [w3c/DOM-Parsing] fragment parsing algorithm appears to be wrong when invoked from innerHTML setter of template element (#61)

It looks like there are two points where the spec is saying to upgrade in the innerHTML setter with a template element: even if the parsing case you desribed here were fixed, I think “try to upgrade” for any given CE produced during parsing would still get hit at [step 7.2.2 of insert a node](https://dom.spec.whatwg.org/#concept-node-insert). Is that accurate?

Browsers appear to do what I’d have figured is the correct behavior in terms of intent (i.e., they do not upgrade during parse or during insertion) but it seems like the `innerHTML` setter steps are pretty far removed from this. There also may be a mistake at step 3 because it assigns a new value to _context object_, but that seems to be a [defined term][3], not a regular local variable. I’d have guessed an algorithm can’t assign to such things but am not certain.

(Seems like this would be a bit safer & easier to reason about if the definition in DOMParsing had remained generic but the HTMLTemplateElement interface had defined its own innerHTML attribute with its own steps, but I’m guessing it’s too late for that now.)

-- 
Reply to this email directly or view it on GitHub:
https://github.com/w3c/DOM-Parsing/issues/61#issuecomment-1120134403

You are receiving this because you are subscribed to this thread.

Message ID: <w3c/DOM-Parsing/issues/61/1120134403@github.com>

Received on Saturday, 7 May 2022 04:57:12 UTC