From 313c8c55de39cd5f009ebb033eec1666b3daa59e Mon Sep 17 00:00:00 2001 From: Bramus Date: Fri, 17 Jan 2025 17:42:30 +0100 Subject: [PATCH] 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` --- packages/react-dom-bindings/src/client/ReactFiberConfigDOM.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/react-dom-bindings/src/client/ReactFiberConfigDOM.js b/packages/react-dom-bindings/src/client/ReactFiberConfigDOM.js index af93760ccfcc9..cea03b73b59d5 100644 --- a/packages/react-dom-bindings/src/client/ReactFiberConfigDOM.js +++ b/packages/react-dom-bindings/src/client/ReactFiberConfigDOM.js @@ -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,