Description
moveBefore() is a new API similar to insertBefore(). I won't be possible to polyfill, but ShadyDOM could possibly wrap it when available to create the right DOM structure.
A good addition here would be to only patch moveBefore() when it's available natively so that feature detection in library code still works.
Motivation
When working on moveBefore() support for lit-html, I hit an error with the polyfill tests: lit/lit#4838
I haven't made a minimal reproduction yet, but the native function is complaining about an invalid hierarchy.
Description
moveBefore()is a new API similar toinsertBefore(). I won't be possible to polyfill, but ShadyDOM could possibly wrap it when available to create the right DOM structure.A good addition here would be to only patch
moveBefore()when it's available natively so that feature detection in library code still works.Motivation
When working on
moveBefore()support for lit-html, I hit an error with the polyfill tests: lit/lit#4838I haven't made a minimal reproduction yet, but the native function is complaining about an invalid hierarchy.