@blueking/bk-weweb 0.0.26-beta.4 → 0.0.26-beta.6

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/index.esm.js CHANGED
@@ -13,6 +13,7 @@ var collectNativeWindowFunc = () => {
13
13
  windowNativeFuncMap[key] = true;
14
14
  }
15
15
  });
16
+ windowNativeFuncMap.Math = true;
16
17
  };
17
18
  collectNativeWindowFunc();
18
19
 
@@ -379,6 +380,8 @@ function rewriteWindowFunction(fakeWindow) {
379
380
  }
380
381
 
381
382
  // src/context/sandbox.ts
383
+ var xxx = /* @__PURE__ */ new Map();
384
+ window.xxxx = xxx;
382
385
  var SandBox = class {
383
386
  constructor(app) {
384
387
  this.app = app;
@@ -415,8 +418,9 @@ var SandBox = class {
415
418
  return true;
416
419
  },
417
420
  get: (target, key) => {
418
- if (windowNativeFuncMap[key]) return rawWindow[key];
421
+ xxx.set(key, +xxx.get(key) + 1);
419
422
  if (key === Symbol.unscopables) return rawWindow[Symbol.unscopables];
423
+ if (windowNativeFuncMap[key]) return rawWindow[key];
420
424
  if (DEV_MICRO_APP_WINDOE_KEY_MAP[key]) return this.fakeWindow[key];
421
425
  if (WINDOW_ALIAS_LIST.includes(key)) return this.proxyWindow;
422
426
  if (key === "document") {
@@ -464,7 +468,7 @@ var SandBox = class {
464
468
  }
465
469
  return void 0;
466
470
  },
467
- has: (target, key) => windowNativeFuncMap[key] || !!target[key] || !!rawWindow[key],
471
+ has: (target, key) => windowNativeFuncMap[key] || key in target || key in rawWindow,
468
472
  // Object.getOwnPropertyNames(window)
469
473
  ownKeys: (target) => Array.from(new Set(Reflect.ownKeys(rawWindow).concat(Reflect.ownKeys(target)))),
470
474
  set: (target, key, value) => {