Skip to content

Commit bbf4082

Browse files
committed
Fix webview
1 parent 28282a7 commit bbf4082

File tree

2 files changed

+12
-0
lines changed

2 files changed

+12
-0
lines changed

packages/ide/src/fill/electron.ts

+4
Original file line numberDiff line numberDiff line change
@@ -137,6 +137,10 @@ const newCreateElement = <K extends keyof HTMLElementTagNameMap>(tagName: K): HT
137137
};
138138
},
139139
});
140+
view.src = require("!!file-loader?name=[path][name].[ext]!./webview.html");
141+
Object.defineProperty(view, "src", {
142+
set: (): void => { /* Nope. */ },
143+
});
140144
(view as any).getWebContents = (): void => undefined; // tslint:disable-line no-any
141145
(view as any).send = (channel: string, ...args: any[]): void => { // tslint:disable-line no-any
142146
if (args[0] && typeof args[0] === "object" && args[0].contents) {

packages/ide/src/fill/webview.html

+8
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
<!DOCTYPE html>
2+
<html lang="en" style="width: 100%; height: 100%">
3+
<head>
4+
<title>Virtual Document</title>
5+
</head>
6+
<body style="margin: 0; overflow: hidden; width: 100%; height: 100%">
7+
</body>
8+
</html>

0 commit comments

Comments
 (0)