On Wed Feb 8 15:59:03 2023 +0000, Gabriel Ivăncescu wrote:
I think so, but I'm worried about other events dispatched to the window (in handle_htmlevent). Should I special case them? (with post_event)
I found a bit more other issues (some were existing now already), for example with readystatechange tasks. It's deeper than just dispatch_event, they use call_property_onchanged for example, but also dispatch the event.
I'm thinking to rewrite this in more generic way using different task lists, one for current tasks, one for event tasks, and one for async XHRs.
Then I'll conditionally dispatch or post the event in nsevents (for window), the rest can stay dispatch_event since they're either synchronous or sent to document (on Gecko side, since we care whether it delays them or not).