--- title: GlobalEventHandlers.ongotpointercapture slug: Web/API/GlobalEventHandlers/ongotpointercapture translation_of: Web/API/GlobalEventHandlers/ongotpointercapture ---

{{ApiRef("HTML DOM")}}

ongotpointercapture 事件是GlobalEventHandlers的属性,这个事件返回gotpointercapture类型的事件操作。

语法

window.ongotpointercapture = functionReference

例子

<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.ongotpointercapture = overHandler;
}
</script>
<body onload="init();">
<div id="target"> Touch me ... </div>
</body>
</html>

Specifications

Specification Status Comment
{{SpecName('Pointer Events 2','#the-gotpointercapture-event', 'onlostpointercapture')}} {{Spec2('Pointer Events 2')}}  

Browser compatibility

{{Compat("api.GlobalEventHandlers.ongotpointercapture")}}

See also