From 33058f2b292b3a581333bdfb21b8f671898c5060 Mon Sep 17 00:00:00 2001 From: Peter Bengtsson Date: Tue, 8 Dec 2020 14:40:17 -0500 Subject: initial commit --- .../web/api/document/exitpointerlock/index.html | 105 +++++++++++++++++++++ 1 file changed, 105 insertions(+) create mode 100644 files/zh-cn/web/api/document/exitpointerlock/index.html (limited to 'files/zh-cn/web/api/document/exitpointerlock') diff --git a/files/zh-cn/web/api/document/exitpointerlock/index.html b/files/zh-cn/web/api/document/exitpointerlock/index.html new file mode 100644 index 0000000000..0a99a81ea2 --- /dev/null +++ b/files/zh-cn/web/api/document/exitpointerlock/index.html @@ -0,0 +1,105 @@ +--- +title: Document.exitPointerLock() +slug: Web/API/Document/exitPointerLock +translation_of: Web/API/Document/exitPointerLock +--- +

{{ apiref("DOM") }}

+ +

{{ seeCompatTable }}

+ +

exitPointerLock 方法可异步的解锁鼠标(通过{{domxref("Element.requestPointerLock")}}锁定的)。

+ +

追踪是否解锁成功,需要监听{{event("pointerlockchange")}} 和{{event("pointerlockerror")}} 事件。

+ +

语法

+ +
document.exitPointerLock();
+
+ +

规范

+ + + + + + + + + + + + + + +
SpecificationStatusComment
{{SpecName('Pointer Lock','l#extensions-to-the-document-interface','Document')}}{{Spec2('Pointer Lock')}}Extend the Document interface
+ +

浏览器兼容性

+ +

{{ CompatibilityTable() }}

+ +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
FeatureChromeEdgeFirefox (Gecko)Internet ExplorerOperaSafari
Basic support{{ CompatVersionUnknown() }} {{property_prefix("webkit")}}{{CompatVersionUnknown}}{{ CompatVersionUnknown() }} {{property_prefix("moz")}}{{ CompatUnknown() }}{{ CompatUnknown() }}{{ CompatUnknown() }}
Unprefixed support{{ CompatVersionUnknown() }}{{CompatUnknown}}{{CompatGeckoDesktop(50)}}   
+
+ +
+ + + + + + + + + + + + + + + + + + + + + +
FeatureAndroidEdgeFirefox Mobile (Gecko)IE MobileOpera MobileSafari Mobile
Basic support{{ CompatUnknown() }}{{CompatVersionUnknown}}{{ CompatUnknown() }}{{ CompatUnknown() }}{{ CompatUnknown() }}{{ CompatUnknown() }}
+
+ +

参见

+ + -- cgit v1.2.3-54-g00ecf