Let's use DOM4 method here:

https://developer.mozilla.org/en-US/docs/DOM/Event/CustomEvent