Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR JAVASCRIPT

captureEvents

<!DOCTYPE html>
<html lang="en">
<head>
<!-- ... -->
<script>
function reg() {
  window.captureEvents(Event.CLICK);
  window.onclick = page_click;
}

function page_click() {
  alert('page click event detected!');
}
</script>
</head>

<body onload="reg();">
<p>click anywhere on this page.</p>
</body>
</html>
Source by developer.mozilla.org #
 
PREVIOUS NEXT
Tagged: #captureEvents
ADD COMMENT
Topic
Name
1+1 =