GlobalEventHandlers.onpointercancel

Você está lendo a versão em inglês deste conteúdo porque ainda não há uma tradução para este idioma. Ajude-nos a traduzir este artigo!

The onpointercancel property of the GlobalEventHandlers mixin is an EventHandler that processes pointercancel events.

Syntax

targetElement.onpointercancel = cancelHandler;

var cancelHandler = targetElement.onpointercancel;

Value

cancelHandler
The pointercancel event handler for element targetElement.

Example

This example shows two ways to use onpointercancel to handle an element's pointercancel events.

<html>
<script>
function cancelHandler(ev) {
  // Process the pointercancel event
}
function init() {
  var el = document.getElementById('target1');
  el.onpointercancel = cancelHandler;
}
</script>

<body onload="init();">
  <div id="target1"> Touch me ... </div>
  <div id="target2" onpointercancel="cancelHandler(event)"> Touch me ... </div>
</body>
</html>

Specifications

Specification Status Comment
Pointer Events – Level 2
The definition of 'onpointercancel' in that specification.
Working Draft Non-stable version
Pointer Events
The definition of 'onpointercancel' in that specification.
Recommendation Initial definition

Browser compatibility

Update compatibility data on GitHub
DesktopMobile
ChromeEdgeFirefoxInternet ExplorerOperaSafariAndroid webviewChrome for AndroidFirefox for AndroidOpera for AndroidSafari on iOSSamsung Internet
onpointercancelChrome Full support 55Edge Full support YesFirefox Full support 59
Full support 59
Full support 29
Disabled
Disabled From version 29: this feature is behind the dom.w3c_pointer_events.enabled preference (needs to be set to true). To change preferences in Firefox, visit about:config.
IE Full support 11
Full support 11
Full support 10
Alternate Name
Alternate Name Uses the non-standard name: onmspointercancel
Opera ? Safari No support NoWebView Android Full support 55Chrome Android Full support 55Firefox Android Full support 29
Disabled
Full support 29
Disabled
Disabled From version 29: this feature is behind the dom.w3c_pointer_events.enabled preference (needs to be set to true). To change preferences in Firefox, visit about:config.
Opera Android ? Safari iOS No support NoSamsung Internet Android ?

Legend

Full support  
Full support
No support  
No support
Compatibility unknown  
Compatibility unknown
User must explicitly enable this feature.
User must explicitly enable this feature.
Uses a non-standard name.
Uses a non-standard name.

See also