Document: pointerlockchange event

pointerlockchange 事件当指针解锁或者被锁定时触发

冒泡 Yes
可取消 No
接口 Event
Event handler property onpointerlockchange

例子

使用 addEventListener():

document.addEventListener('pointerlockchange', (event) => {
  console.log('Pointer lock changed');
});

使用 onpointerlockchange 事件处理程序属性

document.onpointerlockchange = (event) => {
  console.log('Pointer lock changed');
};

Specifications

Specification Status
Pointer Lock Candidate Recommendation

浏览器兼容性

BCD tables only load in the browser

参考