GlobalEventHandlers.onpointerup
The onpointerup
property of the
GlobalEventHandlers
mixin is an event handler that
processes pointerup
events.
Syntax
targetElement.onpointerup = upHandler;
var upHandler = targetElement.onpointerup;
Value
upHandler
-
The
pointerup
event handler for elementtargetElement
.
Example
This example shows two ways to use onpointerup
to set an element's
pointerup
event handler.
<html>
<script>
function upHandler(ev) {
// Process the pointerup event
}
function init() {
let el = document.getElementById('target1');
el.onpointerup = upHandler;
}
</script>
<body onload="init();">
<div id="target1"> Touch me ... </div>
<div id="target2" onpointerup="upHandler(event)"> Touch me ... </div>
</body>
</html>
Specifications
Specification |
---|
Pointer Events # dom-globaleventhandlers-onpointerup |
Browser compatibility
BCD tables only load in the browser
See also
-
Document: pointerup
event -
HTMLElement: pointerup
event