@lvce-editor/renderer-process 8.7.0 → 9.0.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 +18 -4
- package/package.json +1 -1
|
@@ -1483,11 +1483,20 @@ const hydrate$2 = async () => {
|
|
|
1483
1483
|
};
|
|
1484
1484
|
|
|
1485
1485
|
const hasFlag = key => {
|
|
1486
|
-
if (typeof location === 'undefined') {
|
|
1486
|
+
if (typeof location === 'undefined' || typeof document === 'undefined') {
|
|
1487
1487
|
return false;
|
|
1488
1488
|
}
|
|
1489
|
-
const
|
|
1490
|
-
|
|
1489
|
+
const configElement = document.getElementById('Config');
|
|
1490
|
+
if (!configElement) {
|
|
1491
|
+
return false;
|
|
1492
|
+
}
|
|
1493
|
+
const text = configElement.textContent;
|
|
1494
|
+
if (!text) {
|
|
1495
|
+
return false;
|
|
1496
|
+
}
|
|
1497
|
+
const config = JSON.parse(text);
|
|
1498
|
+
const result = config[key];
|
|
1499
|
+
return result;
|
|
1491
1500
|
};
|
|
1492
1501
|
|
|
1493
1502
|
const syntaxHighlightingWorkerUrl = `${assetDir}/packages/renderer-worker/node_modules/@lvce-editor/syntax-highlighting-worker/dist/syntaxHighlightingWorkerMain.js`;
|
|
@@ -5452,6 +5461,11 @@ const listen$3 = async () => {
|
|
|
5452
5461
|
}
|
|
5453
5462
|
const type = firstMessage.params[0];
|
|
5454
5463
|
if (type === 'message-port') {
|
|
5464
|
+
parentIpc.send({
|
|
5465
|
+
jsonrpc: '2.0',
|
|
5466
|
+
id: firstMessage.id,
|
|
5467
|
+
result: null
|
|
5468
|
+
});
|
|
5455
5469
|
parentIpc.dispose();
|
|
5456
5470
|
const port = firstMessage.params[1];
|
|
5457
5471
|
return port;
|
|
@@ -5885,7 +5899,7 @@ const create$y = async ({
|
|
|
5885
5899
|
// TODO await promise
|
|
5886
5900
|
// TODO call separate method HandleMessagePort.handleMessagePort or
|
|
5887
5901
|
// HandleIncomingIpc.handleIncomingIpc
|
|
5888
|
-
invokeAndTransfer$1(ipc,
|
|
5902
|
+
await invokeAndTransfer$1(ipc, 'initialize', 'message-port', port);
|
|
5889
5903
|
unhandleIpc(ipc);
|
|
5890
5904
|
return undefined;
|
|
5891
5905
|
};
|