On Wed Sep 21 23:46:23 2022 +0000, Jacek Caban wrote:
You could just iterate over event_types, there is no need to special-case anything here. We could also move querying nsIDOMEvent interfaces from alloc_event() to create_event_from_nsevent() and just depend on properly passed event type to alloc_event(). We could then get rid of even more special-casing in alloc_event().
Actually, I wanted to go that route in alloc_event with event types ever since I first added ProgressEvents a while back, but it wasn't considered a sure way forward so I had to drop it and rely on the event ids/IID as what was before it, IIRC... That's why I was hesitant to use it now, but I agree I definitely prefer it that way, makes it much cleaner imo.