JS Built-ins
Eventintermediate

Event β€” stopImmediatePropagation is a function

πŸ“– Usage Example
const e = new Event('x')
e.composedPath()  // β†’ [] (not dispatched yet)

composedPath() returns the path of elements the event will traverse.

Event.stopImmediatePropagation

stopImmediatePropagation() prevents both bubbling and subsequent listeners on the same element from running.

Challenge: Verify that typeof new Event('x').stopImmediatePropagation is 'function'.

πŸ’‘ Hints (1)
  • β€’ stopImmediatePropagation is stronger than stopPropagation β€” it also prevents other listeners on the current node