| <!DOCTYPE html> |
| <html> |
| <head> |
| <script> |
| let firedEvents = []; |
| |
| function logEvent(event) |
| { |
| firedEvents.push(event.type); |
| } |
| |
| function setupTest() |
| { |
| document.body.addEventListener("keydown", logEvent, false); |
| document.body.addEventListener("beforeinput", logEvent, false); |
| document.body.addEventListener("input", logEvent, false); |
| document.body.addEventListener("keyup", logEvent, false); |
| document.body.addEventListener("change", logEvent, false); |
| } |
| </script> |
| </head> |
| <body onload="setupTest()" contenteditable="true"> |
| </body> |
| </html> |