Is it possible to expose a Javascript EventTarget object from preload.js via exposeInMainWorld() to the web application which runs in context isolation mode? When I try this, the object exposed to renderer.js, is just a simple object which is not of type EventTarget anymore.
As a workaround I'm now dispatching my events directly to document in preload.js and then I'm adding corresponding listeners on application side, but this pollutes the document namespace unnecessarily.