Re: [w3c/IndexedDB] Editorial: Use WebIDL's new definition conventions for method/etc steps (#335)

@domenic approved this pull request.

Nice, I like the event handler changes especially.

>  
-The <dfn attribute for=IDBRequest>readyState</dfn> attribute's getter
-must return {{"pending"}} if [=/this=]'s [=request/done flag=] is false, and
+<aside class=note>
+    The {{IDBRequest/transaction}} property can be null for certain requests, such as for [=/requests=] returned from {{IDBFactory/open()}}.

Maybe "The transaction getter can return null"? Both are correct though.

> @@ -2078,14 +2081,10 @@ dictionary IDBVersionChangeEventInit : EventInit {
 };
 </xmp>
 
-The <dfn attribute for=IDBVersionChangeEvent>oldVersion</dfn>
-attribute getter returns the previous version of the database.
+The <dfn attribute for=IDBVersionChangeEvent>oldVersion</dfn> getter steps are to return the value it was initialized to. It represents the previous version of the database.

Ideally this concept of "value it was initialized to" would be replaced with explicit associated values, but this is an improvement over the previous version.

> @@ -2503,8 +2500,8 @@ must return [=/this=]'s [=connection/version=].
         [=/upgrade transaction=].
 </div>
 
-The <dfn attribute for=IDBDatabase>objectStoreNames</dfn> attribute's
-getter must return a {{DOMStringList}} associated with a [=sorted name list=] of the [=object-store/names=] of
+The <dfn attribute for=IDBDatabase>objectStoreNames</dfn> getter steps are to
+return a {{DOMStringList}} associated with a [=sorted name list=] of the [=object-store/names=] of
 the [=/object stores=] in [=/this=]'s [=object store set=].

Preexisting issue: it's not clear whether this returns the same DOMStringList each time, or a new DOMStringList. (The former would certainly be better.)

> @@ -2838,21 +2827,22 @@ The {{IDBObjectStore/name}} attribute's setter must run these steps:
 </div>
 
 
-The <dfn attribute for=IDBObjectStore>keyPath</dfn> attribute's getter
-must return [=/this=]'s [=object-store-handle/object store=]'s [=object-store/key path=], or
+The <dfn attribute for=IDBObjectStore>keyPath</dfn> getter steps are to
+return [=/this=]'s [=object-store-handle/object store=]'s [=object-store/key path=], or
 null if none. The [=/key path=] is converted as a {{DOMString}} (if a
 string) or a [=sequence&lt;DOMString&gt;=] (if a list of strings), per

Preexisting issue: this could be nicer typographically if you used the awkward `<code><a interface>sequence</a>&lt;<a interface>DOMString</a>&gt;</code>`

> @@ -3586,8 +3561,7 @@ invoked, must run these steps:
 
 <div class=algorithm>

Preexisting issue: `<div class=algorithm>` is, I believe, not processed by Bikeshed in the same ways as `<div algorithm>`. In particular you're not getting the nice user-facing feature where you can click on a `<var>` and all the instances of it are highlighted, or the spec-developer facing feature of checking for variables that only appear once (usually due to typos).

-- 
You are receiving this because you are subscribed to this thread.
Reply to this email directly or view it on GitHub:
https://github.com/w3c/IndexedDB/pull/335#pullrequestreview-414618163

Received on Tuesday, 19 May 2020 16:35:53 UTC