MouseEvent interface instead of initEvent

[The initEvent method is deprecated.](https://developer.mozilla.org/en-US/docs/Web/API/Event.initEvent)