-
Notifications
You must be signed in to change notification settings - Fork 28.8k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
fixes issue #662 (enables Pointer Lock Web API) #210875
base: main
Are you sure you want to change the base?
Conversation
@@ -166,7 +166,10 @@ export class CodeApplication extends Disposable { | |||
|
|||
const isUrlFromWebview = (requestingUrl: string | undefined) => requestingUrl?.startsWith(`${Schemas.vscodeWebview}://`); | |||
|
|||
const allowedPermissions = new Set(['pointerLock']); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Does this need to be enabled for the root document too? The only use case seems to be for webviews
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes the permission did not work until I added it to the root. That is to say I also needed the permission on the containing frame in order for the child to function in my extension's Webview.
This change fixes microsoft/vscode-extension-samples#662
#221593
By explicitly allowing the
pointerLock
permission in the root document of the VS Code window.Testing
aesthetic-computer.aesthetic-computer-code
extension in the Marketplace.Aesthetic Computer
pane from the Activity Bar.fps
and press[Enter]
.[Escape]
to end the Pointer Lock.