Dash-Industry-Forum / Events

Addresses discussions around Event Processing and APIs
2 stars 6 forks source link

Register interest in an event in Browser #51

Closed haudiobe closed 1 year ago

haudiobe commented 5 years ago

Submitter: Rik Sagar Email: rik.sagar@vudu.com Generally browser objects use addEventListener/removeEventListener to register interest in an event. The setEvents([]) API seems inconsistent with that normal behavior.

The proposed API also seems to be missing any method to remove existing listeners.

haudiobe commented 5 years ago

(Event TF - 19/10/04) Giri checks

gmandyam commented 5 years ago

EventTarget does support these methods: https://developer.mozilla.org/en-US/docs/Web/API/EventTarget/addEventListener. Note that EventTarget seems to have been deprecated in later versions of WebIDL: https://www.w3.org/TR/WebIDL-1/.