nexfep 0.7.0 → 0.7.1
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/package.json +1 -1
- package/src/WindowManager.d.ts +1 -0
- package/src/WindowManager.js +7 -2
package/package.json
CHANGED
package/src/WindowManager.d.ts
CHANGED
package/src/WindowManager.js
CHANGED
|
@@ -156,6 +156,7 @@ class WindowPool {
|
|
|
156
156
|
windowCount;
|
|
157
157
|
freeWindowCount;
|
|
158
158
|
localProxys;
|
|
159
|
+
webContext;
|
|
159
160
|
global;
|
|
160
161
|
constructor(app, options) {
|
|
161
162
|
if (os.platform() === "win32") {
|
|
@@ -164,7 +165,9 @@ class WindowPool {
|
|
|
164
165
|
if (!fs.existsSync(userDataDir)) {
|
|
165
166
|
fs.mkdirSync(userDataDir, { recursive: true });
|
|
166
167
|
}
|
|
167
|
-
|
|
168
|
+
this.webContext = app.createWebContext({
|
|
169
|
+
dataDirectory: userDataDir,
|
|
170
|
+
});
|
|
168
171
|
}
|
|
169
172
|
this.onCustomMessage = (window, message, data) => {
|
|
170
173
|
console.log("Get Custom Message:", message, data, "from window", window.id);
|
|
@@ -402,7 +405,9 @@ class WindowPool {
|
|
|
402
405
|
this.__registryLocalProxy(window, proxy.protocolName, proxy.localPath);
|
|
403
406
|
});
|
|
404
407
|
this.freeWindowCount++;
|
|
405
|
-
const webview = window.createWebview(
|
|
408
|
+
const webview = window.createWebview({
|
|
409
|
+
webContext: this.webContext,
|
|
410
|
+
});
|
|
406
411
|
const windowObj = new Window(window, webview, ++this.windowCount, this);
|
|
407
412
|
this.windows.push(windowObj);
|
|
408
413
|
webview.onIpcMessage((data) => {
|