Jacek Caban (@jacek) commented about dlls/mshtml/htmlevent.c:
+ + if(!queued_event) { + ERR("no memory to queue event\n"); + return E_OUTOFMEMORY; + } + + queued_event->event = event; + queued_event->event_target = event_target; + IDOMEvent_AddRef(&event->IDOMEvent_iface); + IEventTarget_AddRef(&event_target->IEventTarget_iface); + + /* While queuing an event this way would not work correctly with their default behavior + * in Gecko (preventDefault() can't be called because we need to *delay* the default, + * rather than prevent it completely), Gecko does suppress events reaching the document + * during the sync XHR event loop, so all the element/node events should be safe. There + * are other events not delayed by Gecko though, but I think those don't have defaults. What events are not delayed? I'm trying to understand why we need to worry about events initiated by Gecko.
-- https://gitlab.winehq.org/wine/wine/-/merge_requests/2098#note_23190