The contact side bar in the message compose window in Thunderbird, which can be enabled/disabled via F9 is inside a browser element. Its URL is loaded by setting its src attribute:
That load is not seen by the windowlisteners “onOpenWindow” event, so the standard way to inject UI elements after load does not work, because I do not get notified. I also do not get its window element.
I can however use a MutationObserver on the sidebar container itself, the browser element and get notified after the src attribute has been changed to know, when the sidebar has been loaded.
But still I am not able to access any element below the browser element.
let contactpanel = window.document.getElementById("sidebar");
let test1 = contactpanel.getElementById("peopleSearchInput")
let test2 = contactpanel.document.getElementById("peopleSearchInput")
Both test1 and test2 are undefined. Any idea on how to access these elements?
John