Skip to content

Commit 307aa4a

Browse files
committed
Fix READMEs not loading
1 parent 1df352f commit 307aa4a

File tree

1 file changed

+7
-3
lines changed

1 file changed

+7
-3
lines changed

scripts/vscode.patch

+7-3
Original file line numberDiff line numberDiff line change
@@ -738,13 +738,17 @@ index 8e2b9e03bc..c06da1c7d1 100644
738738
-import { isMacintosh } from 'vs/base/common/platform';
739739
+import { isMacintosh } from 'vs/base/browser/browser';
740740
diff --git a/src/vs/workbench/contrib/webview/electron-browser/webviewElement.ts b/src/vs/workbench/contrib/webview/electron-browser/webviewElement.ts
741-
index 5a28744889..79502859a7 100644
741+
index 5a28744889..9d6f38ca7d 100644
742742
--- a/src/vs/workbench/contrib/webview/electron-browser/webviewElement.ts
743743
+++ b/src/vs/workbench/contrib/webview/electron-browser/webviewElement.ts
744-
@@ -19 +19 @@ import { endsWith } from 'vs/base/common/strings';
744+
@@ -19 +19,2 @@ import { endsWith } from 'vs/base/common/strings';
745745
-import { isMacintosh } from 'vs/base/common/platform';
746+
+import { isWeb } from 'vs/base/common/platform';
746747
+import { isMacintosh } from 'vs/base/browser/browser';
747-
@@ -265,0 +266,3 @@ export class WebviewElement extends Disposable {
748+
@@ -254 +255 @@ export class WebviewElement extends Disposable {
749+
- this._webview.src = this._options.useSameOriginForRoot ? require.toUrl('./webview.html') : 'data:text/html;charset=utf-8,%3C%21DOCTYPE%20html%3E%0D%0A%3Chtml%20lang%3D%22en%22%20style%3D%22width%3A%20100%25%3B%20height%3A%20100%25%22%3E%0D%0A%3Chead%3E%0D%0A%09%3Ctitle%3EVirtual%20Document%3C%2Ftitle%3E%0D%0A%3C%2Fhead%3E%0D%0A%3Cbody%20style%3D%22margin%3A%200%3B%20overflow%3A%20hidden%3B%20width%3A%20100%25%3B%20height%3A%20100%25%22%3E%0D%0A%3C%2Fbody%3E%0D%0A%3C%2Fhtml%3E';
750+
+ this._webview.src = isWeb || this._options.useSameOriginForRoot ? require.toUrl('./webview.html') : 'data:text/html;charset=utf-8,%3C%21DOCTYPE%20html%3E%0D%0A%3Chtml%20lang%3D%22en%22%20style%3D%22width%3A%20100%25%3B%20height%3A%20100%25%22%3E%0D%0A%3Chead%3E%0D%0A%09%3Ctitle%3EVirtual%20Document%3C%2Ftitle%3E%0D%0A%3C%2Fhead%3E%0D%0A%3Cbody%20style%3D%22margin%3A%200%3B%20overflow%3A%20hidden%3B%20width%3A%20100%25%3B%20height%3A%20100%25%22%3E%0D%0A%3C%2Fbody%3E%0D%0A%3C%2Fhtml%3E';
751+
@@ -265,0 +267,3 @@ export class WebviewElement extends Disposable {
748752
+ Object.defineProperty(this._options, 'useSameOriginForRoot', {
749753
+ value: true,
750754
+ });

0 commit comments

Comments
 (0)