--- title: Element.ongotpointercapture slug: conflicting/Web/API/GlobalEventHandlers/ongotpointercapture tags: - API - DOM - Element - Event Handler - Pointer Events - Property - Reference - 事件句柄 - 元素 - 属性 - 引用 - 指针事件 translation_of: Web/API/GlobalEventHandlers/ongotpointercapture translation_of_original: Web/API/Element/ongotpointercapture original_slug: Web/API/Element/ongotpointercapture ---
{{ ApiRef("DOM") }}
ongotpointercapture
是一个{{domxref("Element")}} 接口的{{domxref("EventHandler")}} 属性,返回一个{{event("gotpointercapture")}} 事件类型的事件句柄 (function) .
var gotCaptureHandler = target.ongotpointercapture;
gotCaptureHandler
target
的gotpointercapture 事件句柄。 .<html> <script> function overHandler(ev) { // Determine the target event's gotpointercapture handler var gotCaptureHandler = ev.target.ongotpointercapture; } function init() { var el=document.getElementById("target"); el.onpointerover = overHandler; } </script> <body onload="init();"> <div id="target"> Touch me ... </div> </body> </html>
Specification | Status | Comment |
---|---|---|
{{SpecName('Pointer Events 2','#widl-Element-ongotpointercapture', 'ongotpointercapture')}} | {{Spec2('Pointer Events 2')}} | 无稳定版 |
{{SpecName('Pointer Events', '#widl-Element-ongotpointercapture', 'ongotpointercapture')}} | {{Spec2('Pointer Events')}} | Initial definition. |
{{CompatibilityTable}}
Feature | Chrome | Edge | Firefox (Gecko) | Internet Explorer | Opera | Safari (WebKit) |
---|---|---|---|---|---|---|
Basic support | {{CompatNo}} | {{CompatVersionUnknown}} | {{CompatVersionUnknown}} [1] | {{CompatIE("10")}} | {{CompatNo}} | {{CompatNo}} |
Feature | Android | Android Webview | Chrome for Android | Edge | Firefox Mobile (Gecko) | Firefox OS | IE Mobile | Opera Mobile | Safari Mobile |
---|---|---|---|---|---|---|---|---|---|
Basic support | {{CompatNo}} | {{CompatNo}} | {{CompatNo}} | {{CompatVersionUnknown}} | {{CompatNo}} | {{CompatNo}} | {{CompatIE("10")}} | {{CompatNo}} | {{CompatNo}} |
[1] Implementation withdrawn. See {{Bug("1166347")}}.