moveBefore()
The moveBefore() DOM method relocates a node while preserving its state. For example, you can move the active element without losing focus, move an animated element without resetting the animation, or move an iframe without reloading its content.
Status
Limited availability
MDN documentation
Specifications
- DOM (#dom-parentnode-movebefore), from DOM Workstream (WHATWG).
- HTML (#preserving-custom-element-state-when-moved), from HTML Workstream (WHATWG).
Browser support
- Chrome 133 Released on 2025-02-04
- Chrome Android 133 Released on 2025-02-04
- Edge 133 Released on 2025-02-06
- Firefox 144 Released on 2025-10-14
- Firefox for Android 144 Released on 2025-10-14
- Safari ❌ See webkit.org/b/281223
- Safari on iOS ❌ See webkit.org/b/281223
Baseline availability blocked since October 2025 by Safari (2 months)
Developer signals
- State of HTML 2025: interactivity/interactivity_features question
- State of HTML 2025: features/all_features question
Usage (according to Chrome Platform Status)
~0.000% of page loads. More data at chromestatus.com.Web Platform Tests (WPT)
View the latest WPT test results for this featureDeveloper signals
Votes: 0
If you want this feature to be available in all browsers, vote for it by adding a thumbs up reaction (👍) to this GitHub issue, and leave a comment with more information.
View as JSON | Edit this feature | Report an issue | Web-features entry: source, dist