-
Notifications
You must be signed in to change notification settings - Fork 2.6k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Should setting outerHTML on child of DocumentFragment throw an Error? #8657
Comments
outerHTML is defined in https://w3c.github.io/DOM-Parsing/#dom-element-outerhtml not in HTML spec. And yes, setting it should not throw, in case the context object doesn't have a parent, or if parent is document fragment. |
thanks, ill update blink accordingly |
webkit-commit-queue
pushed a commit
to Ahmad-S792/WebKit
that referenced
this issue
Jul 15, 2023
https://bugs.webkit.org/show_bug.cgi?id=249737 rdar://problem/103746193 Reviewed by Chris Dumez. This patch aligns WebKit with Gecko / Firefox and Web-Spec [1]. In 238774@main, WebKit aligned with behavior for better compatibility but it was not correct and clarified later to not throw error [2]. This PR is essentially revert part of 238774@main with update to align by not throwing error. [1] https://w3c.github.io/DOM-Parsing/#dom-element-outerhtml [2] whatwg/html#8657 * Source/WebCore/dom/Element.cpp: (Element::setOuterHTML): Update to not throw error * LayoutTests/fast/dynamic/outerHTML-no-element.html: Rebaselined * LayoutTests/fast/dynamic/outerHTML-no-element-expected.txt: Rebaselined * LayoutTests/fast/dom/set-outer-html-special-cases.html: Rebaselined * LayoutTests/fast/dom/set-outer-html-special-cases-expected.txt: Rebaselined Canonical link: https://commits.webkit.org/266086@main
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Blink and WebKit bugs were opened about this recently:
Blink and WebKit both throw errors, and Gecko does not.
According to the reporter, the spec says that no error should be thrown but I haven't looked at the spec myself yet.
Any thoughts on which behavior we should converge on?
I see in the WebKit bug that @cdumez worked on this recently. Any thoughts?
The text was updated successfully, but these errors were encountered: