Open noamr opened 1 month ago
I suggest we resolve this as "position: support" one week from now. There are a couple of design aspects that will need to be worked through, such as handling animations and creating a suitable mutation record, but overall this looks like the correct way to add a new tree primitive to the DOM.
WebKittens
@annevk
Title of the spec
DOM: Node.prototype.moveBefore
URL to the spec
https://dom.spec.whatwg.org/
URL to the spec's repository
https://github.com/whatwg/dom
Issue Tracker URL
No response
Explainer URL
https://github.com/noamr/dom/blob/spm-explainer/moveBefore-explainer.md
TAG Design Review URL
https://github.com/w3ctag/design-reviews/issues/976
Mozilla standards-positions issue URL
https://github.com/mozilla/standards-positions/issues/1053
WebKit Bugzilla URL
No response
Radar URL
No response
Description
We're proposing a new DOM primitive,
Node.prototype.moveBefore
, a drop-in replacement forNode.prototype.insertBefore
, that allows moving elements in a node tree without incurring state-resets. See details at the explainer and at https://github.com/whatwg/dom/issues/1255. Would love to shape this together with WebKit + Mozilla.