I don't think so, the window is probably destroyed by the time onAfterSend is called, which is the reason why the current implementation of the event fails for your second extension.
Bug 1975854 Comment 9 Edit History
Note: The actual edited comment in the bug view page will always show the original commenter’s name and original timestamp.
I don't think so, the window is probably destroyed by the time onAfterSend is called, which is the reason why the current implementation of the event fails for your second extension. Edit: I added a note to the documentation.