gMsgCompose in bootstrap file for Thunderbird [Solved]

(Musiquegraeme) #1

In my legacy addon this line works


I found somewhere that this line means that I can use Recipients2CompFields.
var win = Services.wm.getMostRecentWindow(“msgcompose”);
But I still have the problem that gMsgCompose is undefined despite it being global in MsgComposeCommands.js
how can I access it so that I can expand the list of recipients?

(Musiquegraeme) #2

After a lot of looking and learning about Tb I found the solution to the above problem. Adding
var gCompose = win[“gMsgCompose”];

gave me access to the fields that I wanted.