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 https://github.com/whatwg/dom/commit/3f3e94c5beda922962dacaeb606087f57bd7f7be)_ As a result, its existence can no longer be checked on `Node.prototype` but must be checked in `Element.prototype`
Bramus committed
Jan 17, 2025 at 17:42 UTC
313c8c55de39cd5f009ebb033eec1666b3daa59e
1 file changed
+1
-1
packages/react-dom-bindings/src/client/ReactFiberConfigDOM.js
+1
-1
@@ -780,7 +780,7 @@ const supportsMoveBefore =
780
// $FlowFixMe[prop-missing]: We're doing the feature detection here.
781
enableMoveBefore &&
782
typeof window !== 'undefined' &&
783
- typeof window.Node.prototype.moveBefore === 'function';
783
+ typeof window.Element.prototype.moveBefore === 'function';
784
785
export function appendChild(
786
parentInstance: Instance,