diff --git a/packages/react-dom-bindings/src/client/ReactDOMFloatClient.js b/packages/react-dom-bindings/src/client/ReactDOMFloatClient.js index 55a37d240351b..e16eeb7e6f43a 100644 --- a/packages/react-dom-bindings/src/client/ReactDOMFloatClient.js +++ b/packages/react-dom-bindings/src/client/ReactDOMFloatClient.js @@ -28,14 +28,8 @@ import { getResourcesFromRoot, markNodeAsResource, } from './ReactDOMComponentTree'; -import {HTML_NAMESPACE} from '../shared/DOMNamespaces'; -import { - getCurrentRootHostContainer, - getHostContext, -} from 'react-reconciler/src/ReactFiberHostContext'; -import {getResourceFormOnly} from './validateDOMNesting'; -import {getNamespace} from './ReactDOMHostConfig'; -import {SVG_NAMESPACE} from '../shared/DOMNamespaces'; +import {HTML_NAMESPACE, SVG_NAMESPACE} from '../shared/DOMNamespaces'; +import {getCurrentRootHostContainer} from 'react-reconciler/src/ReactFiberHostContext'; // The resource types we support. currently they match the form for the as argument. // In the future this may need to change, especially when modules / scripts are supported @@ -1426,124 +1420,6 @@ function insertResourceInstanceBefore( } } -export function isHostResourceType(type: string, props: Props): boolean { - let resourceFormOnly: boolean; - let namespace: string; - if (__DEV__) { - const hostContext = getHostContext(); - resourceFormOnly = getResourceFormOnly(hostContext); - namespace = getNamespace(hostContext); - } - switch (type) { - case 'base': - case 'meta': { - return true; - } - case 'title': { - const hostContext = getHostContext(); - return getNamespace(hostContext) !== SVG_NAMESPACE; - } - case 'link': { - const {onLoad, onError} = props; - if (onLoad || onError) { - if (__DEV__) { - if (resourceFormOnly) { - console.error( - 'Cannot render a with onLoad or onError listeners outside the main document.' + - ' Try removing onLoad={...} and onError={...} or moving it into the root
tag or' + - ' somewhere in the .', - ); - } else if (namespace === SVG_NAMESPACE) { - console.error( - 'Cannot render a with onLoad or onError listeners as a descendent of