Difference between revisions of "Event Watcher"
Jump to navigation
Jump to search
Line 24: | Line 24: | ||
var t = document.createTextNode(evt.type+" " +evt.target); | var t = document.createTextNode(evt.type+" " +evt.target); | ||
d.appendChild(t); | d.appendChild(t); | ||
− | var | + | var log1 = document.getElementById("log1"); |
− | + | log1.appendChild(d); | |
− | + | log1.scrollTop = log1.scrollHeight - log1.clientHeight; | |
//Log the event to Console, so that the event object details may be inspected if desired. | //Log the event to Console, so that the event object details may be inspected if desired. | ||
console.log(e); | console.log(e); | ||
Line 39: | Line 39: | ||
function setup() { | function setup() { | ||
− | var elements = ['s1','i1','b1','a1','d1','d2']; | + | var elements = ['s1','i1','b1','a1','d1','d2','d3','d4']; |
var el; | var el; | ||
Line 88: | Line 88: | ||
</div> | </div> | ||
<h3>Log area</h3> | <h3>Log area</h3> | ||
− | <div id=" | + | <div id="log1" aria-live="polite" > |
</div> | </div> | ||
<button onclick="setup();"> start</button> | <button onclick="setup();"> start</button> |
Revision as of 19:27, 28 March 2018
Move through the fields below and watch the events that are sent by the browser. For example, use with AT to find out what events are being fired.
- onfocus, onblur, onclick, ondbclik, onmouseup, onmousedown, onmouseover
- onkeypress, onkeydown, onkeyup, touchstart, touchend, touchmove, touchcancel
Event types and their target object will be displayed in the section below. Raw event objects will also be logged to the browser console, and may be reviewed with the developer tools.