Fix moveBefore feature detection (#32087)

`moveBefore` was moved to the `ParentNode` mixin as per
https://github.com/whatwg/dom/pull/1307#discussion_r1881981120 _(and was
committed in
3f3e94c5be)_

As a result, its existence can no longer be checked on `Node.prototype`
but must be checked in `Element.prototype`
This commit is contained in:
Bramus
2025-01-17 17:42:30 +01:00
committed by GitHub
parent d46b04a27d
commit 313c8c55de

View File

@@ -780,7 +780,7 @@ const supportsMoveBefore =
// $FlowFixMe[prop-missing]: We're doing the feature detection here.
enableMoveBefore &&
typeof window !== 'undefined' &&
typeof window.Node.prototype.moveBefore === 'function';
typeof window.Element.prototype.moveBefore === 'function';
export function appendChild(
parentInstance: Instance,