Web features explorer

moveBefore()

Limited availability

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.

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 Not supported Bugs: 281223
  • Safari on iOS Not supported Bugs: 281223

Baseline availability blocked since October 2025 by Safari (12 months)

Need this feature?
Leave a 👍 on the feedback issue
Don't forget to also leave a comment explaining your specific use case.

Usage (according to Chrome Platform Status)

~0.065% of page loads. More data at chromestatus.com.

Developer use cases

  • I am currently using this at https://github.com/hackclub/twisted to preserve iFrame loading states when you try moving a window. This makes it so the iFrame doesnt reload every time one of the smaller windows are moved. <!-- Add your specific use-cases, even if they seem obvious to you. --> I am currently using this at https://github.com/hackclub/twisted to preserve iFrame loading states when you try moving a window. This makes it so the iFrame doesnt reload every time one of the smaller windows are moved. <!-- Add your specific use-cases, even if they seem obvious to you. --> [see original comment]