@blueking/bk-weweb 0.0.36-beta.19 → 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 +1 -1
- package/dist/index.esm.js +6 -4
- package/dist/index.esm.js.map +1 -1
- package/package.json +1 -1
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:
|
|
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(
|
|
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", {
|
|
@@ -1541,12 +1544,11 @@ var SandBox = class {
|
|
|
1541
1544
|
const windowDescriptorSet = /* @__PURE__ */ new Set();
|
|
1542
1545
|
const rawWindow = window;
|
|
1543
1546
|
this.rawWindow = rawWindow;
|
|
1544
|
-
|
|
1545
|
-
this.rawDocument = createProxyDocument(rawDocument, app);
|
|
1547
|
+
this.rawDocument = createProxyDocument(document, app);
|
|
1546
1548
|
const fakeWindow = /* @__PURE__ */ Object.create({});
|
|
1547
1549
|
fakeWindow.__BK_WEWEB_APP_KEY__ = app.appCacheKey;
|
|
1548
1550
|
fakeWindow.__POWERED_BY_BK_WEWEB__ = true;
|
|
1549
|
-
fakeWindow.rawDocument =
|
|
1551
|
+
fakeWindow.rawDocument = document;
|
|
1550
1552
|
fakeWindow.rawWindow = rawWindow;
|
|
1551
1553
|
fakeWindow.__proto__ = Window;
|
|
1552
1554
|
this.fakeWindow = fakeWindow;
|