Skip to content
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

DOM State-preserving move (Node.prototype.moveBefore) #375

Closed
noamr opened this issue Jul 23, 2024 · 1 comment
Closed

DOM State-preserving move (Node.prototype.moveBefore) #375

noamr opened this issue Jul 23, 2024 · 1 comment
Assignees
Labels
from: Google Proposed, edited, or co-edited by Google. position: support topic: dom Spec relates to DOM (Document Object Model) venue: WHATWG DOM Workstream

Comments

@noamr
Copy link

noamr commented Jul 23, 2024

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

w3ctag/design-reviews#976

Mozilla standards-positions issue URL

mozilla/standards-positions#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 for Node.prototype.insertBefore, that allows moving elements in a node tree without incurring state-resets. See details at the explainer and at whatwg/dom#1255. Would love to shape this together with WebKit + Mozilla.

@noamr noamr changed the title State-preserving move (Node.prototype.moveBefore) DOM State-preserving move (Node.prototype.moveBefore) Jul 23, 2024
@lukewarlow lukewarlow added topic: dom Spec relates to DOM (Document Object Model) venue: WHATWG DOM Workstream from: Google Proposed, edited, or co-edited by Google. labels Jul 23, 2024
@annevk
Copy link
Contributor

annevk commented Aug 30, 2024

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
from: Google Proposed, edited, or co-edited by Google. position: support topic: dom Spec relates to DOM (Document Object Model) venue: WHATWG DOM Workstream
Projects
None yet
Development

No branches or pull requests

3 participants