Update EventDispatcher.js

fixes #4186