Skip to content

Commit

Permalink
DOM: AbortController and AbortSignal
Browse files Browse the repository at this point in the history
  • Loading branch information
annevk committed May 17, 2017
1 parent 9404dcd commit 9513d94
Show file tree
Hide file tree
Showing 3 changed files with 22 additions and 1 deletion.
2 changes: 2 additions & 0 deletions dom/interface-objects.html
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,8 @@
"Event",
"CustomEvent",
"EventTarget",
"AbortController",
"AbortSignal",
"Node",
"Document",
"DOMImplementation",
Expand Down
2 changes: 2 additions & 0 deletions dom/interfaces.html
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,8 @@ <h1>DOM IDL tests</h1>
idlArray.add_objects({
Event: ['document.createEvent("Event")', 'new Event("foo")'],
CustomEvent: ['new CustomEvent("foo")'],
AbortController: ['new AbortController()'],
AbortSignal: ['new AbortController().signal'],
Document: ['new Document()'],
XMLDocument: ['xmlDoc'],
DOMImplementation: ['document.implementation'],
Expand Down
19 changes: 18 additions & 1 deletion interfaces/dom.idl
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ dictionary CustomEventInit : EventInit {
};


//[Exposed=(Window,Worker)]
[Exposed=(Window,Worker)]
interface EventTarget {
void addEventListener(DOMString type, EventListener? callback, optional (EventListenerOptions or boolean) options);
void removeEventListener(DOMString type, EventListener? callback, optional (EventListenerOptions or boolean) options);
Expand All @@ -61,6 +61,23 @@ dictionary EventListenerOptions {
};


[Constructor,
Exposed=(Window,Worker)]
interface AbortController {
[SameObject] readonly attribute AbortSignal signal;

void abort();
};


[Exposed=(Window,Worker)]
interface AbortSignal : EventTarget {
readonly attribute boolean aborted;

attribute EventHandler onabort;
};


[NoInterfaceObject,
Exposed=Window]
interface NonElementParentNode {
Expand Down

0 comments on commit 9513d94

Please sign in to comment.