Re: [whatwg/dom] Clarification on construction and creation of events (#372)

Thanks @domenic! 

> In general "create an event" should be used very rarely, in specialized situations where you need to separate event creation from event dispatch, or want to customize the realm the event is created in. Fire an event is usually more appropriate.

Ok, maybe we should clarify the above in the spec? In particular, warn people that they should really go and just use "fire an event". In fire an event, "eventConstructor"  should maybe be renamed "eventInterface" as to avoid confusion (it confused me initially as I thought it needed a constructor function). 

> You should never override the default of basic properties of events like cancelable. That would be very unexpected. And what would be the point of making user-created events cancelable by default, since you don't know whether the user will react to cancelation?

Yeah, true. 


-- 
You are receiving this because you are subscribed to this thread.
Reply to this email directly or view it on GitHub:
https://github.com/whatwg/dom/issues/372#issuecomment-259595281

Received on Thursday, 10 November 2016 03:49:13 UTC