diff --git a/dom/abort/event.any.js b/dom/abort/event.any.js new file mode 100644 index 00000000000000..3b25702c2e4c77 --- /dev/null +++ b/dom/abort/event.any.js @@ -0,0 +1,22 @@ +test(t => { + const c = new AbortController(), + s = c.signal; + let state = "begin"; + + assert_false(s.aborted); + + s.addEventListener("abort", + t.step_func(e => { + assert_equals(state, "begin"); + state = "aborted"; + }) + ); + c.abort(); + + assert_equals(state, "aborted"); + assert_true(s.aborted); + + c.abort(); +}, "AbortController() basics"); + +done(); diff --git a/dom/interface-objects.html b/dom/interface-objects.html index df4ca51e47777a..936d63517eada5 100644 --- a/dom/interface-objects.html +++ b/dom/interface-objects.html @@ -15,6 +15,8 @@ "Event", "CustomEvent", "EventTarget", + "AbortController", + "AbortSignal", "Node", "Document", "DOMImplementation", diff --git a/dom/interfaces.html b/dom/interfaces.html index 8b4140d645ca7e..8e9572d0f09ca2 100644 --- a/dom/interfaces.html +++ b/dom/interfaces.html @@ -24,6 +24,8 @@