[Webkit-unassigned] [Bug 217537] replaceChildren() (with no arguments) silently does nothing rather than removing the children
bugzilla-daemon at webkit.org
bugzilla-daemon at webkit.org
Sat Oct 10 11:19:28 PDT 2020
https://bugs.webkit.org/show_bug.cgi?id=217537
Darin Adler <darin at apple.com> changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|NEW |ASSIGNED
Assignee|webkit-unassigned at lists.web |darin at apple.com
|kit.org |
--- Comment #5 from Darin Adler <darin at apple.com> ---
I took a look at the DOM specification. It has an incorrect step:
https://dom.spec.whatwg.org/#dom-parentnode-replacechildren
Note that step 2 says "Ensure pre-insertion validity of node into this before null." But that should only be done if node is non-null. We should probably report that issue. If we took it literally then the function would need to throw a HierarchyRequestError exception, but clearly that’s needed.
I took a look at the Web Platform Tests.
https://github.com/web-platform-tests/wpt/blob/master/dom/nodes/ParentNode-replaceChildren.html
For some reason it does not include a test case for replaceChildren without any argument, on a parent having a child. So we pass that test even though our algorithm is incorrect.
Fixing the bug is really easy, and it’s also easy for me to add a test to WPT, but I don’t know how to correctly upstream a change like this. Could use some help with that.
--
You are receiving this mail because:
You are the assignee for the bug.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.webkit.org/pipermail/webkit-unassigned/attachments/20201010/e16c3f5f/attachment-0001.htm>
More information about the webkit-unassigned
mailing list