Note: According to https://developer.mozilla.org/en-US/docs/Web/API/Event/initEvent initEvent is deprecated
initEvent