@lvce-editor/renderer-process 6.11.0 → 6.13.0
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/rendererProcessMain.js +22 -4
- package/package.json +1 -1
|
@@ -11224,7 +11224,7 @@ const setIframe$2 = (state, src, sandbox = []) => {
|
|
|
11224
11224
|
});
|
|
11225
11225
|
document.body.append($Iframe);
|
|
11226
11226
|
};
|
|
11227
|
-
const setPort = (state, portId, origin) => {
|
|
11227
|
+
const setPort$1 = (state, portId, origin) => {
|
|
11228
11228
|
const $ExistingIframe = document.querySelector('.E2eTestsIframe');
|
|
11229
11229
|
if (!$ExistingIframe) {
|
|
11230
11230
|
throw new Error('no iframe found');
|
|
@@ -11247,7 +11247,7 @@ const ViewletE2eTests = {
|
|
|
11247
11247
|
__proto__: null,
|
|
11248
11248
|
Events: ViewletE2eTestsEvents,
|
|
11249
11249
|
setIframe: setIframe$2,
|
|
11250
|
-
setPort
|
|
11250
|
+
setPort: setPort$1
|
|
11251
11251
|
};
|
|
11252
11252
|
|
|
11253
11253
|
const handleClickAt$1 = event => {
|
|
@@ -11389,15 +11389,33 @@ const setIframe = (state, src, sandbox = []) => {
|
|
|
11389
11389
|
for (const element of sandbox) {
|
|
11390
11390
|
$Iframe.sandbox.add(element);
|
|
11391
11391
|
}
|
|
11392
|
-
$Iframe.className = 'E2eTestIframe';
|
|
11392
|
+
$Iframe.className = 'E2eTestIframe WebViewIframe';
|
|
11393
11393
|
$Iframe.src = src;
|
|
11394
11394
|
$Parent.append($Iframe);
|
|
11395
|
+
state.frame = $Iframe;
|
|
11396
|
+
};
|
|
11397
|
+
const setPort = (state, portId, origin) => {
|
|
11398
|
+
const port = acquire(portId);
|
|
11399
|
+
const {
|
|
11400
|
+
frame
|
|
11401
|
+
} = state;
|
|
11402
|
+
frame.addEventListener('load', () => {
|
|
11403
|
+
const {
|
|
11404
|
+
contentWindow
|
|
11405
|
+
} = frame;
|
|
11406
|
+
contentWindow.postMessage({
|
|
11407
|
+
jsonrpc: '2.0',
|
|
11408
|
+
method: 'setPort',
|
|
11409
|
+
params: [port]
|
|
11410
|
+
}, origin, [port]);
|
|
11411
|
+
});
|
|
11395
11412
|
};
|
|
11396
11413
|
|
|
11397
11414
|
const ViewletWebView = {
|
|
11398
11415
|
__proto__: null,
|
|
11399
11416
|
Events: ViewletWebViewEvents,
|
|
11400
|
-
setIframe
|
|
11417
|
+
setIframe,
|
|
11418
|
+
setPort
|
|
11401
11419
|
};
|
|
11402
11420
|
|
|
11403
11421
|
const getWorkerDisplayName = name => {
|