Skip to content

[ShadowDOM] Implement moveBefore() #631

@justinfagnani

Description

@justinfagnani

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.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions