Comparing version 5.21.2 to 5.21.3
@@ -15,3 +15,3 @@ import ReactDOM from 'react-dom'; | ||
if (target.removeEventListener) { | ||
target.removeEventListener(eventType, callback); | ||
target.removeEventListener(eventType, callback, option); | ||
} | ||
@@ -18,0 +18,0 @@ } |
import type * as React from 'react'; | ||
import type { Root } from 'react-dom/client'; | ||
declare const MARK = "__rc_react_root__"; | ||
declare type ContainerType = (Element | DocumentFragment) & { | ||
[MARK]?: Root; | ||
}; | ||
declare type ContainerType = Element | DocumentFragment; | ||
/** @private Test usage. Not work in prod */ | ||
@@ -8,0 +4,0 @@ export declare function _r(node: React.ReactElement, container: ContainerType): void; |
@@ -31,10 +31,10 @@ import _regeneratorRuntime from "@babel/runtime/regenerator"; | ||
var MARK = '__rc_react_root__'; | ||
var containerRoots = new Map(); | ||
function modernRender(node, container) { | ||
toggleWarning(true); | ||
var root = container[MARK] || createRoot(container); | ||
var root = containerRoots.get(container) || createRoot(container); | ||
toggleWarning(false); | ||
root.render(node); | ||
container[MARK] = root; | ||
containerRoots.set(container, root); | ||
} | ||
@@ -73,6 +73,6 @@ | ||
return _context.abrupt("return", Promise.resolve().then(function () { | ||
var _container$MARK; | ||
var _containerRoots$get; | ||
(_container$MARK = container[MARK]) === null || _container$MARK === void 0 ? void 0 : _container$MARK.unmount(); | ||
delete container[MARK]; | ||
(_containerRoots$get = containerRoots.get(container)) === null || _containerRoots$get === void 0 ? void 0 : _containerRoots$get.unmount(); | ||
containerRoots.delete(container); | ||
})); | ||
@@ -79,0 +79,0 @@ |
@@ -25,3 +25,3 @@ "use strict"; | ||
if (target.removeEventListener) { | ||
target.removeEventListener(eventType, callback); | ||
target.removeEventListener(eventType, callback, option); | ||
} | ||
@@ -28,0 +28,0 @@ } |
import type * as React from 'react'; | ||
import type { Root } from 'react-dom/client'; | ||
declare const MARK = "__rc_react_root__"; | ||
declare type ContainerType = (Element | DocumentFragment) & { | ||
[MARK]?: Root; | ||
}; | ||
declare type ContainerType = Element | DocumentFragment; | ||
/** @private Test usage. Not work in prod */ | ||
@@ -8,0 +4,0 @@ export declare function _r(node: React.ReactElement, container: ContainerType): void; |
@@ -49,10 +49,10 @@ "use strict"; | ||
var MARK = '__rc_react_root__'; | ||
var containerRoots = new Map(); | ||
function modernRender(node, container) { | ||
toggleWarning(true); | ||
var root = container[MARK] || createRoot(container); | ||
var root = containerRoots.get(container) || createRoot(container); | ||
toggleWarning(false); | ||
root.render(node); | ||
container[MARK] = root; | ||
containerRoots.set(container, root); | ||
} | ||
@@ -93,6 +93,6 @@ | ||
return _context.abrupt("return", Promise.resolve().then(function () { | ||
var _container$MARK; | ||
var _containerRoots$get; | ||
(_container$MARK = container[MARK]) === null || _container$MARK === void 0 ? void 0 : _container$MARK.unmount(); | ||
delete container[MARK]; | ||
(_containerRoots$get = containerRoots.get(container)) === null || _containerRoots$get === void 0 ? void 0 : _containerRoots$get.unmount(); | ||
containerRoots.delete(container); | ||
})); | ||
@@ -99,0 +99,0 @@ |
{ | ||
"name": "rc-util", | ||
"version": "5.21.2", | ||
"version": "5.21.3", | ||
"description": "Common Utils For React Component", | ||
@@ -5,0 +5,0 @@ "keywords": [ |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
196774
6022