Skip to content

Commit 0eb2d12

Browse files
dexterobrad4d
authored andcommitted
Add PointerLockOptions argument to requestPointerLock
Experimental API proposed in w3c/pointerlock#49 and implemented in Chromium (crbug/982379) ------------- Created by MOE: https://github.com/google/moe MOE_MIGRATED_REVID=291899961
1 parent 1ba9de3 commit 0eb2d12

1 file changed

Lines changed: 12 additions & 2 deletions

File tree

externs/browser/w3c_pointerlock.js

Lines changed: 12 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -21,12 +21,22 @@
2121
* @externs
2222
*/
2323

24+
/**
25+
* TODO(bradfordcsmith): update the link when PR is merged
26+
* @see https://github.com/w3c/pointerlock/pull/49/
27+
* @record
28+
*/
29+
function PointerLockOptions() {}
30+
31+
/** @type {undefined|boolean} */
32+
PointerLockOptions.prototype.unadjustedMovement;
2433

2534
/**
2635
* @see https://w3c.github.io/pointerlock/#widl-Element-requestPointerLock-void
27-
* @return {void}
36+
* @param {!PointerLockOptions=} options
37+
* @return {void|!Promise<void>}
2838
*/
29-
Element.prototype.requestPointerLock = function() {};
39+
Element.prototype.requestPointerLock = function(options) {};
3040

3141
/**
3242
* @see https://w3c.github.io/pointerlock/#widl-Document-pointerLockElement

0 commit comments

Comments
 (0)