fix(home): add sandbox setting for iframe and retain context when hidden for webview

This commit is contained in:
Levi Yan
2024-12-27 10:11:22 +08:00
parent e696decaf6
commit f731eba7bf

View File

@@ -31,6 +31,7 @@ export default class DSHome {
vscode.ViewColumn.One,
{
enableScripts: true,
retainContextWhenHidden: true,
}
);
@@ -152,7 +153,7 @@ export default class DSHome {
</head>
<body>
<iframe id="embedded-devstar" src="${devstarHomePageUrl}" width="100%" height="100%" frameborder="0"
<iframe id="embedded-devstar" src="${devstarHomePageUrl}" sandbox="allow-popups allow-same-origin allow-scripts allow-forms allow-top-navigation-by-user-activation" width="100%" height="100%" frameborder="0"
style="border: 0; left: 0; right: 0; bottom: 0; top: 0; position:absolute;">
</iframe>