On Sun Sep 18 12:12:46 2022 +0000, Jacek Caban wrote:
The worst part is that you're adding a special case where it's not needed at all. The fact that the special case makes Gecko object diverge from MSHTML counterpart also feels like step backwards. Improving event_types[] sounds better to me.
The special case is simply mirroring the behavior of create_document_event; in my opinion, having these 2 functions differ in behavior is confusing and is actually a bug, even if irrelevant. At least it was confusing for me.
While it's true that event_types can be fixed for both MessageEvent and StorageEvent in this case, I didn't find a reason to do it, because we don't use Gecko's at all. In fact we can't even query their specific interfaces because they're not exposed as XPCOM (at least for MessageEvent, didn't bother to look at StorageEvent) so it's pointless.
Are you sure you want to use them, then?