diff --git a/index.bs b/index.bs index add5d4c..668f9a1 100644 --- a/index.bs +++ b/index.bs @@ -361,7 +361,7 @@ from the database. Ideally the user will never see this.

Constructs

-A sorted list is a {{DOMStringList}} containing strings +A sorted list is a list containing strings sorted in ascending order by code unit. @@ -755,17 +755,17 @@ of running the steps to [=compare two keys=] with |a| and |b| is 0.

Key Path

-A key path is a {{DOMString}} or -[=sequence<DOMString>=] that defines how to extract a [=/key=] +A key path is a string or list of strings +that defines how to extract a [=/key=] from a [=/value=]. A valid key path is one of: -* An empty {{DOMString}}. -* An identifier, which is a {{DOMString}} matching the +* An empty string. +* An identifier, which is a string matching the [=IdentifierName=] production from the ECMAScript Language Specification [[!ECMA-262]]. -* A {{DOMString}} consisting of two or more [=identifiers=] separated +* A string consisting of two or more [=identifiers=] separated by periods (ASCII character code 46, U+002E FULL STOP). -* A non-empty [=sequence<DOMString>=] containing only strings +* A non-empty list containing only strings conforming to the above requirements.

2. Constructs

-

A sorted list is a DOMStringList containing strings +

A sorted list is a list containing strings sorted in ascending order by code unit.

2.1. Database

Each origin has an associated set of databases. A database has zero or more object stores which @@ -2155,18 +2155,19 @@

byte values (in the range [-128, 127]).

2.5. Key Path

-

A key path is a DOMString or sequence<DOMString> that defines how to extract a key from a value. A valid key path is one of:

+

A key path is a string or list of strings +that defines how to extract a key from a value. A valid key path is one of:

@@ -3311,7 +3312,7 @@

The objectStoreNames attribute’s -getter must return a sorted list of the names of +getter must return a DOMStringList associated with a sorted list of the names of the object stores in this connection's object store set.

Is this the same as the database's object store names? @@ -3550,17 +3551,15 @@

The keyPath attribute’s getter -must return this object store handle's object store's key -path, or null if none.

-

The conversion is done following the normal [WEBIDL] binding logic -for DOMString and sequence<DOMString> values, as -appropriate.

+must return this object store handle's object store's key path, or +null if none. The key path is converted as a DOMString (if a +string) or a sequence<DOMString> (if a list of strings), per [WEBIDL].

The returned value is not the same instance that was used when the object store was created. However, if this attribute returns an object (specifically an Array), it returns the same object instance every time it is inspected. Changing the properties of the object has no effect on the object store.

The indexNames attribute’s -getter must return a sorted list of the names of indexes in this object store handle's index set.

+getter must return a DOMStringList associated with a sorted list of the names of indexes in this object store handle's index set.

Is this the same as object store's list of index names? @@ -4232,7 +4231,7 @@

objectStore
Returns the IDBObjectStore the index belongs to.
index . keyPath -
Returns the key path of the index. +
Returns the key path of the index.
index . multiEntry
Returns true if the index’s multiEntry flag is set.
index . unique @@ -4283,10 +4282,8 @@

index handle's object store handle.

The keyPath attribute’s getter must -return this index handle's index's key path.

-

The conversion is done following the normal [WEBIDL] binding logic -for DOMString and sequence<DOMString> values, as -appropriate.

+return this index handle's index's key path. The key path is converted as a DOMString (if a string) or a sequence<DOMString> (if a +list of strings), per [WEBIDL].

The returned value is not the same instance that was used when the index was created. However, if this attribute returns an object (specifically an Array), it returns the same object instance every time it is inspected. Changing the properties of the @@ -5069,10 +5066,10 @@

If this transaction is an upgrade transaction, -return a sorted list of the names of the object stores in this transaction's connection's object store +return a DOMStringList associated with a sorted list of the names of the object stores in this transaction's connection's object store set.

  • -

    Otherwise, return a sorted list of the names of the object stores in +

    Otherwise, return a DOMStringList associated with a sorted list of the names of the object stores in this transaction's scope.

    @@ -5995,7 +5992,7 @@

    7. ECMAScript binding

    This section defines how key values defined in this specification are converted to and from ECMAScript values, and how they may be -extracted from and injected into ECMAScript values using key +extracted from and injected into ECMAScript values using key paths. This section references types and algorithms and uses some algorithm conventions from the ECMAScript Language Specification. [ECMA-262] Conversions not detailed here are defined in [WEBIDL].

    7.1. Extract a key from a value

    @@ -6026,7 +6023,7 @@

    1. -

      If keyPath is a sequence<DOMString>, run these substeps:

      +

      If keyPath is a list of strings, run these substeps:

      1. Let result be a new Array object created as if by the @@ -6034,7 +6031,7 @@

        Let i be 0.

      2. -

        For each item in the keyPath sequence, run these substeps:

        +

        For each item in keyPath, run these substeps:

        1. Let key be the result of recursively running the steps to evaluate a key path on a value using item as keyPath and value as value.

          @@ -6054,7 +6051,7 @@

        2. Return result.

          -
      3. @@ -6104,7 +6101,7 @@

        Assertions can be made in the above steps because this algorithm is only applied to values that are the output of StructuredClone and only access "own" properties.

        7.2. Inject a key into a value

        -