From 5b4184cf82b352342e59eda5c0d4f4e3386a1472 Mon Sep 17 00:00:00 2001 From: Dominique Hazael-Massieux Date: Wed, 29 Jun 2022 17:38:09 +0200 Subject: [PATCH] Associate event definitions with the interfaces they fire at (#387) * Associate event definitions with the interfaces they fire at as other specs do. Also helps with extracting machine readable data. * Disambiguate attribute from event for error in IDBRequest --- index.bs | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) diff --git a/index.bs b/index.bs index d93a954..04335ad 100644 --- a/index.bs +++ b/index.bs @@ -502,12 +502,12 @@ running. A [=/connection=]'s [=get the parent=] algorithm returns null. -An event with type `versionchange` will be fired at an open +An event with type `versionchange` will be fired at an open [=/connection=] if an attempt is made to upgrade or delete the [=/database=]. This gives the [=/connection=] the opportunity to close to allow the upgrade or delete to proceed. -An event with type `close` will be fired at a [=/connection=] if the connection is [=/close a database connection|closed=] abnormally. +An event with type `close` will be fired at a [=/connection=] if the connection is [=/close a database connection|closed=] abnormally. @@ -1137,10 +1137,10 @@ They will return true if any transactions were cleaned up, or false otherwise. each [=/transaction=]. -An event with type `complete` is fired at +An event with type `complete` is fired at a [=/transaction=] that has successfully [=transaction/committed=]. -An event with type `abort` is fired at +An event with type `abort` is fired at a [=/transaction=] that has [=transaction/aborted=]. @@ -1245,12 +1245,12 @@ request=]. When a request is made, a new [=/request=] is returned with its [=request/done flag=] set to false. If a request completes successfully, its [=request/done flag=] is set to true, its [=request/result=] is set to the result of the request, -and an event with type `success` is fired at the +and an event with type `success` is fired at the [=/request=]. If an error occurs while performing the operation, the request's [=request/done flag=] is set to true, the request's [=request/error=] is set to the error, and an event with -type `error` is fired at the request. +type `error` is fired at the request. A [=/request=]'s [=get the parent=] algorithm returns the request's [=request/transaction=]. @@ -1273,7 +1273,7 @@ A [=/request=]'s [=get the parent=] algorithm returns the request's An open request is a special type of [=/request=] used when opening a [=/connection=] or deleting a [=/database=]. In addition to `success` and `error` events, -`blocked` and `upgradeneeded` events may be fired at an [=request/open +`blocked` and `upgradeneeded` events may be fired at an [=request/open request=] to indicate progress. The [=request/source=] of an [=request/open request=] @@ -2003,7 +2003,7 @@ enum IDBRequestReadyState { or `undefined` if the request failed. Throws a "{{InvalidStateError}}" {{DOMException}} if the request is still pending. - : |request| . {{IDBRequest/error}} + : |request| . error :: When a request is completed, returns the [=request/error=] (a {{DOMException}}), or null if the request succeeded. Throws @@ -2912,7 +2912,7 @@ and false otherwise. If {{IDBObjectStore/put()}} is used, any existing [=object-store/record=] with the [=/key=] will be replaced. If {{IDBObjectStore/add()}} is used, and if a [=object-store/record=] with the [=/key=] already exists - the |request| will fail, with |request|'s {{IDBRequest/error}} + the |request| will fail, with |request|'s error set to a "{{ConstraintError}}" {{DOMException}}. If successful, |request|'s {{IDBRequest/result}} will be the