From 1a8f6910dfc1bf4edc46b23076380cf4cedeaca0 Mon Sep 17 00:00:00 2001 From: Jake Archibald Date: Fri, 8 Sep 2017 12:52:39 +0100 Subject: [PATCH] Align with Fetch's upcoming abort revamp See https://github.com/whatwg/fetch/pull/523 for details. --- xhr.bs | 83 ++++++++++++++++++++++------------------------------------ 1 file changed, 31 insertions(+), 52 deletions(-) diff --git a/xhr.bs b/xhr.bs index 607131a..6bf26e7 100644 --- a/xhr.bs +++ b/xhr.bs @@ -252,9 +252,6 @@ interface XMLHttpRequest : XMLHttpRequestEventTarget {

An {{XMLHttpRequest}} object has an associated send() flag. Unless stated otherwise it is unset. -

An {{XMLHttpRequest}} object has an associated stop timeout flag. -Unless stated otherwise it is unset. -

Constructors

@@ -286,7 +283,8 @@ registered whose type is one of

If an {{XMLHttpRequest}} object is garbage collected while its -connection is still open, the user agent must terminate the request. +connection is still open, the user agent must terminate the ongoing +fetch operated by the {{XMLHttpRequest}} object.

Event handlers

@@ -397,16 +395,17 @@ the row where the value in the cell in the first column is context object author request headers, request body, synchronous flag, -upload complete flag, and -upload listener flag. +upload complete flag, +upload listener flag, and +timed out flag.

The author request headers is an initially empty header list.

The request body is initially null. -

The synchronous flag, upload complete flag, and -upload listener flag are initially unset. +

The synchronous flag, upload complete flag, upload listener flag and +timed out flag are initially unset.

Registering one or more event listeners on an {{XMLHttpRequestUpload}} object will result in a CORS-preflight request. (That is @@ -415,13 +414,6 @@ turn causes the use-CORS-preflight flag to be set.)


-

To terminate the request, -terminate the -fetch algorithm operated by the -{{XMLHttpRequest}} object with reason fatal. - - -

The open() method

@@ -517,7 +509,8 @@ methods, when invoked, must run these steps: InvalidAccessError exception.
  • -

    Terminate the request. +

    Terminate the ongoing fetch operated by the + {{XMLHttpRequest}} object.

    A fetch can be ongoing at this point. @@ -526,8 +519,7 @@ methods, when invoked, must run these steps:

    Set variables associated with the object as follows: