@bz_moz Saw you are the editor on the Web IDL spec and was wondering if there's a way to specify that a given object will dispatch an event using that language? Similar to what TypeScript/Angular will do with `EventEmitter`, but for DOM stuff.
-
-
Replying to @calebwilliams12
Not per se, since events are not part of IDL itself, but typically what you would do is: (1) the object inherits from the EventTarget interface <https://dom.spec.whatwg.org/#interface-eventtarget …>. (2) The object may have attributes of type EventHandler <https://html.spec.whatwg.org/multipage/webappapis.html#event-handler-attributes:eventhandler-2 …> named "onwhatever".
1 reply 0 retweets 1 like -
Replying to @really_bz @calebwilliams12
https://dom.spec.whatwg.org/#interface-AbortSignal … is a typical example of this pattern.
1 reply 0 retweets 1 like -
Loading seems to be taking a while.
Twitter may be over capacity or experiencing a momentary hiccup. Try again or visit Twitter Status for more information.