Skip to content

Commit 5b4184c

Browse files
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
1 parent bb2eb85 commit 5b4184c

File tree

1 file changed

+9
-9
lines changed

1 file changed

+9
-9
lines changed

index.bs

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -502,12 +502,12 @@ running.
502502
A [=/connection=]'s [=get the parent=] algorithm returns
503503
null.
504504

505-
An event with type <dfn event>`versionchange`</dfn> will be fired at an open
505+
An event with type <dfn event for=IDBDatabase>`versionchange`</dfn> will be fired at an open
506506
[=/connection=] if an attempt is made to upgrade or delete the
507507
[=/database=]. This gives the [=/connection=] the opportunity to close
508508
to allow the upgrade or delete to proceed.
509509

510-
An event with type <dfn event>`close`</dfn> will be fired at a [=/connection=] if the connection is [=/close a database connection|closed=] abnormally.
510+
An event with type <dfn event for=IDBDatabase>`close`</dfn> will be fired at a [=/connection=] if the connection is [=/close a database connection|closed=] abnormally.
511511

512512
</div>
513513

@@ -1137,10 +1137,10 @@ They will return true if any transactions were cleaned up, or false otherwise.
11371137
each [=/transaction=].
11381138
</aside>
11391139

1140-
An event with type <dfn event>`complete`</dfn> is fired at
1140+
An event with type <dfn event for=IDBTransaction>`complete`</dfn> is fired at
11411141
a [=/transaction=] that has successfully [=transaction/committed=].
11421142

1143-
An event with type <dfn event>`abort`</dfn> is fired at
1143+
An event with type <dfn event for=IDBTransaction>`abort`</dfn> is fired at
11441144
a [=/transaction=] that has [=transaction/aborted=].
11451145

11461146
<!-- ============================================================ -->
@@ -1245,12 +1245,12 @@ request=].
12451245
When a request is made, a new [=/request=] is returned with its [=request/done
12461246
flag=] set to false. If a request completes successfully, its [=request/done flag=]
12471247
is set to true, its [=request/result=] is set to the result of the request,
1248-
and an event with type <dfn event>`success`</dfn> is fired at the
1248+
and an event with type <dfn event for=IDBRequest>`success`</dfn> is fired at the
12491249
[=/request=].
12501250

12511251
If an error occurs while performing the operation, the request's [=request/done flag=]
12521252
is set to true, the request's [=request/error=] is set to the error, and an event with
1253-
type <dfn event>`error`</dfn> is fired at the request.
1253+
type <dfn event for=IDBRequest>`error`</dfn> is fired at the request.
12541254

12551255
A [=/request=]'s [=get the parent=] algorithm returns the request's
12561256
[=request/transaction=].
@@ -1273,7 +1273,7 @@ A [=/request=]'s [=get the parent=] algorithm returns the request's
12731273
An <dfn>open request</dfn> is a special type of [=/request=] used
12741274
when opening a [=/connection=] or deleting a [=/database=].
12751275
In addition to <a event for=request>`success`</a> and <a event for=request>`error`</a> events,
1276-
<dfn event>`blocked`</dfn> and <dfn event>`upgradeneeded`</dfn> events may be fired at an [=request/open
1276+
<dfn event for=IDBOpenDBRequest>`blocked`</dfn> and <dfn event for=IDBOpenDBRequest>`upgradeneeded`</dfn> events may be fired at an [=request/open
12771277
request=] to indicate progress.
12781278

12791279
The [=request/source=] of an [=request/open request=]
@@ -2003,7 +2003,7 @@ enum IDBRequestReadyState {
20032003
or `undefined` if the request failed. Throws a
20042004
"{{InvalidStateError}}" {{DOMException}} if the request is still pending.
20052005

2006-
: |request| . {{IDBRequest/error}}
2006+
: |request| . <a attribute for=IDBRequest>error</a>
20072007
::
20082008
When a request is completed, returns the [=request/error=] (a
20092009
{{DOMException}}), or null if the request succeeded. Throws
@@ -2912,7 +2912,7 @@ and false otherwise.
29122912
If {{IDBObjectStore/put()}} is used, any existing [=object-store/record=]
29132913
with the [=/key=] will be replaced. If {{IDBObjectStore/add()}}
29142914
is used, and if a [=object-store/record=] with the [=/key=] already exists
2915-
the |request| will fail, with |request|'s {{IDBRequest/error}}
2915+
the |request| will fail, with |request|'s <a attribute for=IDBRequest>error</a>
29162916
set to a "{{ConstraintError}}" {{DOMException}}.
29172917

29182918
If successful, |request|'s {{IDBRequest/result}} will be the

0 commit comments

Comments
 (0)