Thunderbird compose-send-message event does not fire

I followed the tutorial to get the Thunderbird extension and was successful in the extension using the load event to work (base "date" example and random text using alert("hey"); both work).

However, I cannot get messages to trigger events. I tried using different types of warnings and it seems my code is not running. For instance:

 function send_event_handler( evt ) { alert("hohoho"); } window.addEventListener( "compose-send-message", send_event_handler, true ); 

How do I get trigger events that allow me to modify message bodies?

My test platform uses Thunderbird 13.

My manifest:

 content thundersafe chrome/content/ overlay chrome://messenger/content/messenger.xul chrome://thundersafe/content/thundersafe.xul 
+4
source share
1 answer

Thanks to Vladimir Palant, I was looking for other overlays. This did not happen to me, because I thought that the overlay would be useful only for setting up the GUI through XUL junction points - it is clear that I have something to learn.

The correct overlay for my use:

 chrome://messenger/content/messengercompose/messengercompose.xul 

This overlay was discovered by looking at other extensions. I could not find the list of overlays and their intended use anywhere in the MDN.

+6
source

All Articles