How to detect when user switches between compose windows?
compose event is triggered only when compose is started, not when user switches between multiple open composes.
How can I detect this and get the compose object of active compose?
There’s no API for that. But if you structure your code correctly, it should be able to work around for many scenarios.
What are you actually trying to accomplish?
I just need to change display in my chrome extension each time user switches between compose windows, based on some properties of compose object.
Then you will have to access the main compose html-element exposed by the compose instance and add your own custom DOM events on to that.
And if you can find a fairly generic way to do that… feel free to submit a PR 😉