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

How to observe rerender event?

Open ghost opened this issue 6 years ago • 5 comments

I notice that after about 10 seconds, the list of emails was rerendered and all the customized dom was disapeared. I tried to use gmail.observe poll and refresh but it didn't fired any event. Does anyone found a way to workaround?

ghost avatar Aug 31 '18 02:08 ghost

New or old gmail? Any folder? Just how do you reproduce this behaviour?

I'll need a lot more information to be able to offer advice for this one.

josteink avatar Aug 31 '18 06:08 josteink

Opps, my mistake. It's inbox, sent.. any label page in new UI. My current workaround is use mutation-summary to detect custom dom disapear event and then rerender the UI.

ghost avatar Aug 31 '18 06:08 ghost

Is there any gmail.js solution for this? If you watch the inspector on the email table on the new Gmail, you can see all email flashes and is re-rendered after ~10 seconds, any dom changes are gone.

Repro, simply add a class to an email thread td.zA and it will be removed shortly after load.

ryanmclaughlin avatar Apr 16 '19 18:04 ryanmclaughlin

Never tried to customize this page. If there's a way, it probably involves adding custom observers/event-handlers and combining it with the tools that GmailJS provides.

josteink avatar Apr 17 '19 10:04 josteink

@josteink 👍 thanks for the thoughts. started using mutation observers, but it's not working reliably. perhaps something gmail does to prevent it.

ryanmclaughlin avatar Apr 17 '19 15:04 ryanmclaughlin

Old issue is old. Closing! :)

josteink avatar Oct 11 '23 08:10 josteink