JS Built-ins
Eventbeginner

Event β€” composed defaults to false

πŸ“– Usage Example
const e = new Event('x')
typeof e.timeStamp  // β†’ 'number'

timeStamp gives the high-resolution time when the event was created.

Event.composed

composed determines whether the event can cross the shadow DOM boundary. It defaults to false.

Challenge: Verify that new Event('x').composed is false.

πŸ’‘ Hints (1)
  • β€’ Pass { composed: true } to allow the event to cross shadow DOM boundaries