JavaScript Homework 12

DOM Event Testing

A small browser demo for button events, mouse tracking and event delegation.

Open DevTools Console to see the event output
01

Click event

Button handler

Click either button and check the message in the browser console.

02

Mouse event

Mouse position

Move the mouse across the page. The current X and Y coordinates are logged to the console.

Move your cursor here
03

Event delegation

List item clicks

One event listener is attached to the whole list. Click any item to see its text in the console.

  • Design system
  • DOM events
  • Automated tests
  • GitHub Pages