Skip to content

Commit

Permalink
Fix moveBefore feature detection (#32087)
Browse files Browse the repository at this point in the history
`moveBefore` was moved to the `ParentNode` mixin as per
whatwg/dom#1307 (comment) _(and was
committed in
whatwg/dom@3f3e94c5beda922962dacaeb606087f57bd7f7be)_

As a result, its existence can no longer be checked on `Node.prototype`
but must be checked in `Element.prototype`
  • Loading branch information
bramus authored Jan 17, 2025
1 parent d46b04a commit 313c8c5
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down

0 comments on commit 313c8c5

Please sign in to comment.