mirror of
https://github.com/microsoft/vscode.git
synced 2026-07-08 23:32:36 -05:00
fix download issues in webviews (#108603)
* fix download issues in webviews * also add allow-download in ts src
This commit is contained in:
@@ -492,7 +492,7 @@
|
||||
const newFrame = document.createElement('iframe');
|
||||
newFrame.setAttribute('id', 'pending-frame');
|
||||
newFrame.setAttribute('frameborder', '0');
|
||||
newFrame.setAttribute('sandbox', options.allowScripts ? 'allow-scripts allow-forms allow-same-origin allow-pointer-lock' : 'allow-same-origin allow-pointer-lock');
|
||||
newFrame.setAttribute('sandbox', options.allowScripts ? 'allow-scripts allow-forms allow-same-origin allow-pointer-lock allow-downloads' : 'allow-same-origin allow-pointer-lock');
|
||||
if (host.fakeLoad) {
|
||||
// We should just be able to use srcdoc, but I wasn't
|
||||
// seeing the service worker applying properly.
|
||||
|
||||
@@ -67,7 +67,7 @@ export class IFrameWebview extends BaseWebview<HTMLIFrameElement> implements Web
|
||||
// Wait the end of the ctor when all listeners have been hooked up.
|
||||
const element = document.createElement('iframe');
|
||||
element.className = `webview ${options.customClasses || ''}`;
|
||||
element.sandbox.add('allow-scripts', 'allow-same-origin', 'allow-forms', 'allow-pointer-lock');
|
||||
element.sandbox.add('allow-scripts', 'allow-same-origin', 'allow-forms', 'allow-pointer-lock', 'allow-downloads');
|
||||
element.style.border = 'none';
|
||||
element.style.width = '100%';
|
||||
element.style.height = '100%';
|
||||
|
||||
Reference in New Issue
Block a user