Search code examples
javascriptevents

How to check if event propagation was stopped?


I am writing an event dispatcher in JavaScript and I've decided to base on standard js CustomEvent class. I can't find out how to detect if event propagation was stopped in the listener (via e.stopPropagation()). Should I rather write an Event object implementation myself?


Solution

  • As far as I can tell, there is no way but to spy on the Event.prototype.stopPropagation function.