RESOLVED INVALID Bug 91596
ShadowRoot.innerHTML should not use the host's parsing rule.
https://bugs.webkit.org/show_bug.cgi?id=91596
Summary ShadowRoot.innerHTML should not use the host's parsing rule.
Shinya Kawanaka
Reported 2012-07-18 00:31:51 PDT
In ShadowRoot::setInnerHTML, host() is used for context element to createFragmentForInnerOuterHTML(). This changes the behavior of shadowRoot.innerHTML = "..." if the host element is changed. e.g. For <textarea>, almost of tags will be ignored.
Attachments
Repro (411 bytes, text/html)
2012-07-18 00:54 PDT, Shinya Kawanaka
no flags
Shinya Kawanaka
Comment 1 2012-07-18 00:54:30 PDT
Shinya Kawanaka
Comment 2 2012-07-18 00:56:39 PDT
In the repro, shadowRoot1.innerHTML.firstChild and shadowRoot2.innerHTML.firstChild should be the same. However, since xmp does not accept any tag, shadowRoot1.firstChild is a text node and shadowRoot2.firstChild is an anchor node.
Shinya Kawanaka
Comment 3 2012-07-18 02:52:12 PDT
I'm trying to attack this now. Changing Element to ContainerNode worked, but I'm not sure It's OK.
Shinya Kawanaka
Comment 4 2012-07-18 19:10:30 PDT
I've filed the Bug in the spec... https://www.w3.org/Bugs/Public/show_bug.cgi?id=18321 Using the host element's parsing rule seems natural to me now, but we have to care about what the host element is when using innerHTML.
Shinya Kawanaka
Comment 5 2012-08-08 00:34:16 PDT
Since the spec was updated so that the host element is used for parsing context element, this bug is now invalid.
Note You need to log in before you can comment on or make changes to this bug.