Re: [whatwg/dom] Editorial: simplify EventListenerOptions processing (#492)

annevk commented on this pull request.



> @@ -894,8 +894,8 @@ for historical reasons.
 <pre class=idl>
 [Constructor, Exposed=(Window,Worker)]
 interface EventTarget {
-  void addEventListener(DOMString type, EventListener? callback, optional (AddEventListenerOptions or boolean) options);
-  void removeEventListener(DOMString type, EventListener? callback, optional (EventListenerOptions or boolean) options);
+  void addEventListener(DOMString type, EventListener? callback, optional (AddEventListenerOptions or boolean) options = false);

This way we don't have to set the default value in prose. For some reason we didn't spot this solution in the original PR and we had all the defaults in prose and therefore I argued to not have them in IDL: https://github.com/whatwg/dom/pull/82#discussion-diff-47618015.

-- 
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/pull/492#discussion_r133635971

Received on Thursday, 17 August 2017 07:01:23 UTC