Esta página ha sido traducida del inglés por la comunidad. Aprende más y únete a la comunidad de MDN Web Docs.

View in English Always switch to English

Element.ongotpointercapture

Baseline
Ampliamente disponible

Esta característica está consolidada y funciona en muchos dispositivos y versiones de navegador. Está disponible en todos los navegadores desde julio de 2020.

ongotpointercapture es una propiedad event handler de la interfaz Element que devuelve el controlador de eventos (función) para el evento tipo gotpointercapture.

Síntaxis

js
var gotCaptureHandler = target.ongotpointercpature;

Valor de Retorno

gotCaptureHandler

El controlador de eventos gotpointercapture para el elemento target.

Ejemplo

js
<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>

Especificaciones

Especificación
Pointer Events
# gotpointercapture
Pointer Events
# dom-globaleventhandlers-ongotpointercapture

Compatibilidad con navegadores

Véase también