This is an archived page. It's not actively maintained.


There are a lot of events that can be fired in Mail code. Some of these are standard events, such as those created by the DOM. Others are internal to Gecko or other parts of Mozilla application code. This reference will help you track those events down and learn how to use them.


Event Name Event Type Fired when...
compose-send-message A message gets sent
compose-window-close A compose window gets closed
compose-window-init A compose window has been opened
compose-window-reopen A cached compose window has been reopened. No load event is fired in this case.


Event Name Event Type Fired when...
onActiveMessagesLoaded The active messages in the folder have been loaded
onCreatedView A folder view has been created, but not yet shown. If custom column handlers need to do something, this is likely the event you are looking for.
onDestroyingView The current folder view is being destroyed.
onDisplayingFolder A folder gets displayed
onFolderLoading A folder is being loaded
onLeavingFolder A folder is being unloaded, includes deletion
onLoadingFolder A folder is being loaded
onMakeActive A FolderDisplayWidget becomes active
onMessageCountsChanged The counts of the messages changed
onMessagesLoaded The messages in the folder have been loaded
onMessagesRemovalFailed Removing some messages from the current folder failed
onMessagesRemoved Some messages of the current message list have been removed
onSearching A folder view derived from a search is being loaded, e.g. saved searches, virtual folders, a quicksearch
onSortChanged The sort method in the messages list has been changed