mirror of
https://github.com/servo/servo.git
synced 2025-08-08 06:55:31 +01:00
Implement EventListenerOptions for EventTarget
For now, only "capture" is supported.
This commit is contained in:
parent
8732f6de69
commit
3d0b7fbc41
6 changed files with 108 additions and 41 deletions
|
@ -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;
|
||||
};
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue