@oxog/react-check 1.0.1 → 1.0.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/browser-inject.global.js +2 -2
- package/dist/index.cjs +17 -0
- package/dist/index.cjs.map +1 -1
- package/dist/index.js +17 -0
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -5496,6 +5496,23 @@ var ReactCheckInjector = class {
|
|
|
5496
5496
|
return;
|
|
5497
5497
|
}
|
|
5498
5498
|
win.__REACTCHECK_INJECTED__ = true;
|
|
5499
|
+
if (!win.__REACT_DEVTOOLS_GLOBAL_HOOK__) {
|
|
5500
|
+
const hook = {
|
|
5501
|
+
renderers: /* @__PURE__ */ new Map(),
|
|
5502
|
+
supportsFiber: true,
|
|
5503
|
+
inject: function(renderer) {
|
|
5504
|
+
const id = this.renderers.size + 1;
|
|
5505
|
+
this.renderers.set(id, renderer);
|
|
5506
|
+
return id;
|
|
5507
|
+
},
|
|
5508
|
+
onCommitFiberRoot: function() {
|
|
5509
|
+
},
|
|
5510
|
+
onCommitFiberUnmount: function() {
|
|
5511
|
+
}
|
|
5512
|
+
};
|
|
5513
|
+
win.__REACT_DEVTOOLS_GLOBAL_HOOK__ = hook;
|
|
5514
|
+
console.log("[ReactCheck] DevTools hook installed");
|
|
5515
|
+
}
|
|
5499
5516
|
const injector = new ReactCheckInjector();
|
|
5500
5517
|
if (document.readyState === "loading") {
|
|
5501
5518
|
document.addEventListener("DOMContentLoaded", () => {
|