gmail.js icon indicating copy to clipboard operation
gmail.js copied to clipboard

How to detect when user switches between compose windows?

Open markon1 opened this issue 3 years ago • 4 comments

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?

markon1 avatar Dec 19 '22 11:12 markon1

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?

josteink avatar Dec 19 '22 12:12 josteink

I just need to change display in my chrome extension each time user switches between compose windows, based on some properties of compose object.

markon1 avatar Dec 19 '22 14:12 markon1

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.

josteink avatar Dec 19 '22 14:12 josteink

And if you can find a fairly generic way to do that… feel free to submit a PR 😉

josteink avatar Dec 19 '22 14:12 josteink