I tried
browser.tabs.onCreated.addListener(newTab);
and it worked, it ran newTab
I tried
browser.windows.onCreated.addListener(newWindow);
and it didn't work although these events look exactly the same. What is the difference?
I want to have a Listener that will react when a compose window is opened. It needs to add
a listener to that window that does some stuff when the email is sent. I'm trying to re
write my addon in WebExtensions and not finding much help anywhere..
Blessings
Hi Graeme,
sorry I haven't replied earlier. I think what would make sense here is to create an API similar to webRequest that gives you a specific notification when an email is sent, so you can make modifications.
Your window listener will not work because as mentioned before, compose windows are not yet tracked in the windows API.
This is actually a good example on rethinking how to approach add-ons when migrating from xul extensions to MailExtensions. You want to solve a high level goal, not port the add-on 1:1 and rely on the specific technical properties of the window.
I hope to find time to explain in a bit more detail, if you know what I mean with a webRequest API maybe you want to propose an API that could work here, or maybe someone else wants to chime in.
Happy New Year!
Philipp
On 31. Dec 2018, at 5:46 PM, Graeme musiquegraeme@gmail.com wrote:
I tried
browser.tabs.onCreated.addListener(newTab);
and it worked, it ran newTab
I tried
browser.windows.onCreated.addListener(newWindow);
and it didn't work although these events look exactly the same. What is the difference?
I want to have a Listener that will react when a compose window is opened. It needs to add a listener to that window that does some stuff when the email is sent. I'm trying to re write my addon in WebExtensions and not finding much help anywhere..
Blessings
Maildev mailing list
Maildev@lists.thunderbird.net
http://lists.thunderbird.net/mailman/listinfo/maildev_lists.thunderbird.net