Enable pointer lock in iframe based webviews

#104169
This commit is contained in:
Matt Bierner 2020-09-02 10:34:09 -07:00
parent 8727c4f476
commit 495b05c1de

View file

@ -70,7 +70,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');
element.sandbox.add('allow-scripts', 'allow-same-origin', 'allow-forms', 'allow-pointer-lock');
element.style.border = 'none';
element.style.width = '100%';
element.style.height = '100%';