Implement EventListenerOptions for EventTarget

For now, only "capture" is supported.
This commit is contained in:
Guillaume Gomez 2016-06-04 15:20:04 +02:00 committed by Anthony Ramine
parent 8732f6de69
commit 3d0b7fbc41
6 changed files with 108 additions and 41 deletions

View file

@ -7,12 +7,27 @@
[Abstract, Exposed=(Window,Worker,Worklet)]
interface EventTarget {
void addEventListener(DOMString type,
EventListener? listener,
optional boolean capture = false);
void removeEventListener(DOMString type,
EventListener? listener,
optional boolean capture = false);
void addEventListener(
DOMString type,
EventListener? callback,
optional (AddEventListenerOptions or boolean) options
);
void removeEventListener(
DOMString type,
EventListener? callback,
optional (EventListenerOptions or boolean) options
);
[Throws]
boolean dispatchEvent(Event event);
};
dictionary EventListenerOptions {
boolean capture = false;
};
dictionary AddEventListenerOptions : EventListenerOptions {
// boolean passive = false;
// boolean once = false;
};