@blueking/bk-weweb 0.0.36-beta.18 → 0.0.36-beta.20

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.d.mts CHANGED
@@ -281,7 +281,7 @@ declare class SandBox {
281
281
  /** 代理的 window 对象 */
282
282
  readonly proxyWindow: WindowProxy & IInjectWindowAttrs;
283
283
  /** 原始 document 对象 */
284
- rawDocument: Record<string, any>;
284
+ rawDocument: Document;
285
285
  /** 原始 window 对象 */
286
286
  readonly rawWindow: Window;
287
287
  /** 在 window 上的唯一标识键 */
package/dist/index.esm.js CHANGED
@@ -1271,7 +1271,10 @@ function createProxyBody(rawDocument, app) {
1271
1271
  }
1272
1272
  function createElementWithAppKey(rawDocument, app) {
1273
1273
  return function createElement(tagName, options) {
1274
- const element = rawDocument.createElement(tagName, options);
1274
+ const element = (window.rawDocument || rawDocument).createElement(
1275
+ tagName,
1276
+ options
1277
+ );
1275
1278
  element[APP_KEY_PROPERTY] = app.appCacheKey;
1276
1279
  if (element instanceof HTMLImageElement) {
1277
1280
  Object.defineProperty(element, "src", {