Add IDBObjectStore.clear(). Bug 11266
authorJonas Sicking <jonas@sicking.cc>
Mon, 08 Nov 2010 14:04:03 -0800
changeset 865de451aac387
parent 85 932a76fe14e7
child 87 623ffb60c3bb
Add IDBObjectStore.clear(). Bug 11266
Overview.html
Speclet_021_IDB_API_Algorithms.html
Speclet_022_IDB_API_Synchronous_APIs.html
Speclet_023_IDB_API_Asynchronous_APIs.html
     1.1 --- a/Overview.html	Mon Nov 08 09:36:46 2010 -0800
     1.2 +++ b/Overview.html	Mon Nov 08 14:04:03 2010 -0800
     1.3 @@ -1564,12 +1564,20 @@
     1.4              </dd>
     1.5              <dt>IDBRequest get()</dt>
     1.6              <dd>
     1.7 -              If the <var>key</var> parameter is not a valid <a>key value</a> or a <a>key range</a>, this method
     1.8 -              throws a DATA_ERR exception. Otherwise, this method runs the <a>steps for asynchronously executing
     1.9 -              a request</a> and returns the <a>IDBRequest</a> created by these steps. The steps are run with this
    1.10 -              <a>IDBObjectStore</a> as <var>source</var> and the <a>steps for retrieving a value from an
    1.11 -              object store</a> as <var>operation</var>, using this <a>IDBObjectStore</a> as <var>store</var> and the
    1.12 -              <var>key</var> parameter as <var>key</var>.
    1.13 +              <p>
    1.14 +                If the <var>key</var> parameter is not a <a>valid key</a> or a <a>key range</a>, this method
    1.15 +                throws a DATA_ERR exception. Otherwise, this method runs the <a>steps for asynchronously executing
    1.16 +                a request</a> and returns the <a>IDBRequest</a> created by these steps. The steps are run with this
    1.17 +                <a>IDBObjectStore</a> as <var>source</var> and the <a>steps for retrieving a value from an
    1.18 +                object store</a> as <var>operation</var>, using this <a>IDBObjectStore</a> as <var>store</var> and the
    1.19 +                <var>key</var> parameter as <var>key</var>.
    1.20 +              </p>
    1.21 +              <p class="note">
    1.22 +                This function produces the same result if a record with the given key doesn't exist as when a record
    1.23 +                exists, but has <code>undefined</code> as value. If you need to tell the two situations apart, you can use
    1.24 +                <a href="#widl-IDBObjectStore-openCursor">openCursor</a> with the same key. This will return a cursor with
    1.25 +                <code>undefined</code> as value if a record exists, or no cursor if no such record exists.
    1.26 +              </p>
    1.27                <dl class="parameters">
    1.28                  <dt>any key</dt>
    1.29                  <dd>Key identifying the <a>record</a> to be retrieved. This can also be a <a>IDBKeyRange</a> in which case
    1.30 @@ -1582,10 +1590,29 @@
    1.31                  <dd>The <var>key</var> parameter was not passed a valid value.</dd>
    1.32                </dl>
    1.33              </dd>
    1.34 +            <dt>IDBRequest clear()</dt>
    1.35 +            <dd>
    1.36 +              <p>
    1.37 +                This method throws a READ_ONLY_ERR if the transaction which this IDBObjectStore belongs to is
    1.38 +                has its <a>mode</a> set to READ_ONLY.
    1.39 +              </p>
    1.40 +              <p>
    1.41 +                Otherwise this method runs the <a>steps for asynchronously executing a request</a> and returns the
    1.42 +                <a>IDBRequest</a> created by these steps. The steps are run with this <a>IDBObjectStore</a> as
    1.43 +                <var>source</var> and the <a>steps for clearing an object store</a> as <var>operation</var>, using
    1.44 +                this <a>IDBObjectStore</a> as <var>store</var>.
    1.45 +              </p>
    1.46 +              <dl class="exception" title="IDBDatabaseException">
    1.47 +                <dt>TRANSACTION_INACTIVE_ERR</dt>
    1.48 +                <dd>The <a>transaction</a> this <a>IDBObjectStore</a> belongs to is not <a>active</a>.</dd>
    1.49 +                <dt>READ_ONLY_ERR</dt>
    1.50 +                <dd>The <a>mode</a> of the <a>transaction</a> this <a>IDBObjectStore</a> belongs to is READ_ONLY.</dd>
    1.51 +              </dl>
    1.52 +            </dd>
    1.53              <dt>IDBRequest openCursor()</dt>
    1.54              <dd>
    1.55                <p>
    1.56 -                If the <var>range</var> parameter is specified but is not a valid <a>key value</a> or a <a>key range</a>,
    1.57 +                If the <var>range</var> parameter is specified but is not a <a>valid key</a> or a <a>key range</a>,
    1.58                  this method throws a DATA_ERR exception. Otherwise, this method creates a <a>cursor</a> with an undefined
    1.59                  <a>position</a>, a <a>direction</a> set to the value of the <var>direction</var> parameter, false as
    1.60                  <a>iterable</a> flag value, and undefined <a title="cursor key">key</a> and
    1.61 @@ -1720,7 +1747,7 @@
    1.62              <dt>IDBRequest openCursor()</dt>
    1.63              <dd>
    1.64                <p>
    1.65 -                If the <var>range</var> parameter is specified but is not a valid <a>key value</a> or a <a>key range</a>,
    1.66 +                If the <var>range</var> parameter is specified but is not a <a>valid key</a> or a <a>key range</a>,
    1.67                  this method throws a DATA_ERR exception. Otherwise, this method creates a <a>cursor</a> with an undefined
    1.68                  <a>position</a>, a <a>direction</a> set to the value of the <var>direction</var> parameter, false as
    1.69                  <a>iterable</a> flag value, and undefined <a title="cursor key">key</a> and
    1.70 @@ -1755,7 +1782,7 @@
    1.71              <dt>IDBRequest openKeyCursor()</dt>
    1.72              <dd>
    1.73                <p>
    1.74 -                If the <var>range</var> parameter is specified but is not a valid <a>key value</a> or a <a>key range</a>,
    1.75 +                If the <var>range</var> parameter is specified but is not a <a>valid key</a> or a <a>key range</a>,
    1.76                  this method throws a DATA_ERR exception. Otherwise, this method creates a <a>cursor</a> with an undefined
    1.77                  <a>position</a>, a <a>direction</a> set to the value of the <var>direction</var> parameter, false as
    1.78                  <a>iterable</a> flag value, and undefined <a title="cursor key">key</a> and
    1.79 @@ -1789,12 +1816,20 @@
    1.80              </dd>
    1.81              <dt>IDBRequest get()</dt>
    1.82              <dd>
    1.83 -              If the <var>key</var> parameter is not a valid <a>key value</a> or a <a>key range</a>, this method
    1.84 -              throws a DATA_ERR exception. This method runs the <a>steps for asynchronously executing a request</a>
    1.85 -              and returns the <a>IDBRequest</a> created by these steps. The steps are run with this
    1.86 -              <a>IDBObjectStore</a> as <var>source</var> and the <a>steps for retrieving a referenced value from an
    1.87 -              index</a> as <var>operation</var>, using this <a>IDBIndex</a> as <var>index</var> and the
    1.88 -              <var>key</var> parameter as <var>key</var>.
    1.89 +              <p>
    1.90 +                If the <var>key</var> parameter is not a <a>valid key</a> or a <a>key range</a>, this method
    1.91 +                throws a DATA_ERR exception. This method runs the <a>steps for asynchronously executing a request</a>
    1.92 +                and returns the <a>IDBRequest</a> created by these steps. The steps are run with this
    1.93 +                <a>IDBObjectStore</a> as <var>source</var> and the <a>steps for retrieving a referenced value from an
    1.94 +                index</a> as <var>operation</var>, using this <a>IDBIndex</a> as <var>index</var> and the
    1.95 +                <var>key</var> parameter as <var>key</var>.
    1.96 +              </p>
    1.97 +              <p class="note">
    1.98 +                This function produces the same result if a record with the given key doesn't exist as when a record
    1.99 +                exists, but has <code>undefined</code> as value. If you need to tell the two situations apart, you can use
   1.100 +                <a href="#widl-IDBIndex-openCursor">openCursor</a> with the same key. This will return a cursor with
   1.101 +                <code>undefined</code> as value if a record exists, or no cursor if no such record exists.
   1.102 +              </p>
   1.103                <dl class="parameters">
   1.104                  <dt>any key</dt>
   1.105                  <dd>Key identifying the record to be retrieved. This can also be a <a>IDBKeyRange</a> in which case
   1.106 @@ -1809,12 +1844,20 @@
   1.107              </dd>
   1.108              <dt>IDBRequest getKey()</dt>
   1.109              <dd>
   1.110 -              If the <var>key</var> parameter is not a valid <a>key value</a> or a <a>key range</a>, this method
   1.111 -              throws a DATA_ERR exception. This method runs the <a>steps for asynchronously executing a request</a>
   1.112 -              and returns the <a>IDBRequest</a> created by these steps. The steps are run with this
   1.113 -              <a>IDBObjectStore</a> as <var>source</var> and the <a>steps for retrieving a value from an
   1.114 -              index</a> as <var>operation</var>, using this <a>IDBIndex</a> as <var>index</var> and the
   1.115 -              <var>key</var> parameter as <var>key</var>.
   1.116 +              <p>
   1.117 +                If the <var>key</var> parameter is not a <a>valid key</a> or a <a>key range</a>, this method
   1.118 +                throws a DATA_ERR exception. This method runs the <a>steps for asynchronously executing a request</a>
   1.119 +                and returns the <a>IDBRequest</a> created by these steps. The steps are run with this
   1.120 +                <a>IDBObjectStore</a> as <var>source</var> and the <a>steps for retrieving a value from an
   1.121 +                index</a> as <var>operation</var>, using this <a>IDBIndex</a> as <var>index</var> and the
   1.122 +                <var>key</var> parameter as <var>key</var>.
   1.123 +              </p>
   1.124 +              <p class="note">
   1.125 +                This function produces the same result if a record with the given key doesn't exist as when a record
   1.126 +                exists, but has <code>undefined</code> as value. If you need to tell the two situations apart, you can use
   1.127 +                <a href="#widl-IDBIndex-openKeyCursor">openKeyCursor</a> with the same key. This will return a cursor with
   1.128 +                <code>undefined</code> as value if a record exists, or no cursor if no such record exists.
   1.129 +              </p>
   1.130                <dl class="parameters">
   1.131                  <dt>any key</dt>
   1.132                  <dd>Key identifying the record to be retrieved. This can also be a <a>IDBKeyRange</a> in which case
   1.133 @@ -2471,6 +2514,25 @@
   1.134                  </dd>
   1.135                </dl>
   1.136              </dd>
   1.137 +            <dt>void clear()</dt>
   1.138 +            <dd>
   1.139 +              <p>
   1.140 +                This method throws a READ_ONLY_ERR if the transaction which this IDBObjectStore belongs to is
   1.141 +                has its <a>mode</a> set to READ_ONLY.
   1.142 +              </p>
   1.143 +              <p>
   1.144 +                Otherwise this method runs the <a>steps for synchronously executing a request</a>. The steps
   1.145 +                are run with this <a>IDBObjectStore</a> as <var>source</var> and the
   1.146 +                <a>steps for clearing an object store</a> as <var>operation</var>, using
   1.147 +                this <a>IDBObjectStore</a> as <var>store</var>.
   1.148 +              </p>
   1.149 +              <dl class="exception" title="IDBDatabaseException">
   1.150 +                <dt>TRANSACTION_INACTIVE_ERR</dt>
   1.151 +                <dd>The <a>transaction</a> this <a>IDBObjectStore</a> belongs to is not <a>active</a>.</dd>
   1.152 +                <dt>READ_ONLY_ERR</dt>
   1.153 +                <dd>The <a>mode</a> of the <a>transaction</a> this <a>IDBObjectStore</a> belongs to is READ_ONLY.</dd>
   1.154 +              </dl>
   1.155 +            </dd>
   1.156              <dt>IDBIndexSync createIndex()</dt>
   1.157              <dd>
   1.158                <p>
   1.159 @@ -3068,12 +3130,19 @@
   1.160          <section class="section">
   1.161            <h4>Steps for synchronously executing a <a>request</a></h4>
   1.162            <p>
   1.163 -            When taking the <dfn>steps to a synchronously execute a request</dfn> the implementation MUST run the
   1.164 -            following algorithm. The algorithm takes a <var>transaction</var> object and a <var>operation</var> to
   1.165 +            When taking the <dfn>steps for synchronously executing a request</dfn> the implementation MUST run the
   1.166 +            following algorithm. The algorithm takes a <var>source</var> object and a <var>operation</var> to
   1.167              perform on a database.
   1.168            </p>
   1.169            <ol>
   1.170              <li>
   1.171 +              Set <var>transaction</var> .
   1.172 +            </li>
   1.173 +            <li>
   1.174 +              If the <a>transaction</a> associated with <var>source</var> is not <a>active</a> throw a
   1.175 +              TRANSACTION_INACTIVE_ERR exception.
   1.176 +            </li>
   1.177 +            <li>
   1.178                Perform <var>operation</var>.
   1.179              </li>
   1.180              <li>
   1.181 @@ -3412,6 +3481,27 @@
   1.182              </li>
   1.183            </ol>
   1.184          </section>
   1.185 +
   1.186 +        <section class="section">
   1.187 +          <h4>Object Store Clear Operation</h4>
   1.188 +          <p>
   1.189 +            The <dfn>steps for clearing an object store</dfn> are as follows. 
   1.190 +            The algorithm run by these steps takes one parameter: a object store <var>store</var>.
   1.191 +          </p>
   1.192 +          <ol>
   1.193 +            <li>
   1.194 +               Remove all records from <var>store</var>.
   1.195 +            </li>
   1.196 +            <li>
   1.197 +              In all <a>index</a>es which <a title="referenced">reference</a> <var>store</var>, remove all
   1.198 +              <a>records</a>.
   1.199 +            </li>
   1.200 +            <li>
   1.201 +              The result of this algorithm is <code>undefined</code>.
   1.202 +            </li>
   1.203 +          </ol>
   1.204 +        </section>
   1.205 +
   1.206          <section class="section">
   1.207            <h4>Cursor Iteration Operation</h4>
   1.208            <p>
     2.1 --- a/Speclet_021_IDB_API_Algorithms.html	Mon Nov 08 09:36:46 2010 -0800
     2.2 +++ b/Speclet_021_IDB_API_Algorithms.html	Mon Nov 08 14:04:03 2010 -0800
     2.3 @@ -294,12 +294,19 @@
     2.4          <section class="section">
     2.5            <h4>Steps for synchronously executing a <a>request</a></h4>
     2.6            <p>
     2.7 -            When taking the <dfn>steps to a synchronously execute a request</dfn> the implementation MUST run the
     2.8 -            following algorithm. The algorithm takes a <var>transaction</var> object and a <var>operation</var> to
     2.9 +            When taking the <dfn>steps for synchronously executing a request</dfn> the implementation MUST run the
    2.10 +            following algorithm. The algorithm takes a <var>source</var> object and a <var>operation</var> to
    2.11              perform on a database.
    2.12            </p>
    2.13            <ol>
    2.14              <li>
    2.15 +              Set <var>transaction</var> .
    2.16 +            </li>
    2.17 +            <li>
    2.18 +              If the <a>transaction</a> associated with <var>source</var> is not <a>active</a> throw a
    2.19 +              TRANSACTION_INACTIVE_ERR exception.
    2.20 +            </li>
    2.21 +            <li>
    2.22                Perform <var>operation</var>.
    2.23              </li>
    2.24              <li>
    2.25 @@ -638,6 +645,27 @@
    2.26              </li>
    2.27            </ol>
    2.28          </section>
    2.29 +
    2.30 +        <section class="section">
    2.31 +          <h4>Object Store Clear Operation</h4>
    2.32 +          <p>
    2.33 +            The <dfn>steps for clearing an object store</dfn> are as follows. 
    2.34 +            The algorithm run by these steps takes one parameter: a object store <var>store</var>.
    2.35 +          </p>
    2.36 +          <ol>
    2.37 +            <li>
    2.38 +               Remove all records from <var>store</var>.
    2.39 +            </li>
    2.40 +            <li>
    2.41 +              In all <a>index</a>es which <a title="referenced">reference</a> <var>store</var>, remove all
    2.42 +              <a>records</a>.
    2.43 +            </li>
    2.44 +            <li>
    2.45 +              The result of this algorithm is <code>undefined</code>.
    2.46 +            </li>
    2.47 +          </ol>
    2.48 +        </section>
    2.49 +
    2.50          <section class="section">
    2.51            <h4>Cursor Iteration Operation</h4>
    2.52            <p>
     3.1 --- a/Speclet_022_IDB_API_Synchronous_APIs.html	Mon Nov 08 09:36:46 2010 -0800
     3.2 +++ b/Speclet_022_IDB_API_Synchronous_APIs.html	Mon Nov 08 14:04:03 2010 -0800
     3.3 @@ -510,6 +510,25 @@
     3.4                  </dd>
     3.5                </dl>
     3.6              </dd>
     3.7 +            <dt>void clear()</dt>
     3.8 +            <dd>
     3.9 +              <p>
    3.10 +                This method throws a READ_ONLY_ERR if the transaction which this IDBObjectStore belongs to is
    3.11 +                has its <a>mode</a> set to READ_ONLY.
    3.12 +              </p>
    3.13 +              <p>
    3.14 +                Otherwise this method runs the <a>steps for synchronously executing a request</a>. The steps
    3.15 +                are run with this <a>IDBObjectStore</a> as <var>source</var> and the
    3.16 +                <a>steps for clearing an object store</a> as <var>operation</var>, using
    3.17 +                this <a>IDBObjectStore</a> as <var>store</var>.
    3.18 +              </p>
    3.19 +              <dl class="exception" title="IDBDatabaseException">
    3.20 +                <dt>TRANSACTION_INACTIVE_ERR</dt>
    3.21 +                <dd>The <a>transaction</a> this <a>IDBObjectStore</a> belongs to is not <a>active</a>.</dd>
    3.22 +                <dt>READ_ONLY_ERR</dt>
    3.23 +                <dd>The <a>mode</a> of the <a>transaction</a> this <a>IDBObjectStore</a> belongs to is READ_ONLY.</dd>
    3.24 +              </dl>
    3.25 +            </dd>
    3.26              <dt>IDBIndexSync createIndex()</dt>
    3.27              <dd>
    3.28                <p>
     4.1 --- a/Speclet_023_IDB_API_Asynchronous_APIs.html	Mon Nov 08 09:36:46 2010 -0800
     4.2 +++ b/Speclet_023_IDB_API_Asynchronous_APIs.html	Mon Nov 08 14:04:03 2010 -0800
     4.3 @@ -682,12 +682,20 @@
     4.4              </dd>
     4.5              <dt>IDBRequest get()</dt>
     4.6              <dd>
     4.7 -              If the <var>key</var> parameter is not a valid <a>key value</a> or a <a>key range</a>, this method
     4.8 -              throws a DATA_ERR exception. Otherwise, this method runs the <a>steps for asynchronously executing
     4.9 -              a request</a> and returns the <a>IDBRequest</a> created by these steps. The steps are run with this
    4.10 -              <a>IDBObjectStore</a> as <var>source</var> and the <a>steps for retrieving a value from an
    4.11 -              object store</a> as <var>operation</var>, using this <a>IDBObjectStore</a> as <var>store</var> and the
    4.12 -              <var>key</var> parameter as <var>key</var>.
    4.13 +              <p>
    4.14 +                If the <var>key</var> parameter is not a <a>valid key</a> or a <a>key range</a>, this method
    4.15 +                throws a DATA_ERR exception. Otherwise, this method runs the <a>steps for asynchronously executing
    4.16 +                a request</a> and returns the <a>IDBRequest</a> created by these steps. The steps are run with this
    4.17 +                <a>IDBObjectStore</a> as <var>source</var> and the <a>steps for retrieving a value from an
    4.18 +                object store</a> as <var>operation</var>, using this <a>IDBObjectStore</a> as <var>store</var> and the
    4.19 +                <var>key</var> parameter as <var>key</var>.
    4.20 +              </p>
    4.21 +              <p class="note">
    4.22 +                This function produces the same result if a record with the given key doesn't exist as when a record
    4.23 +                exists, but has <code>undefined</code> as value. If you need to tell the two situations apart, you can use
    4.24 +                <a href="#widl-IDBObjectStore-openCursor">openCursor</a> with the same key. This will return a cursor with
    4.25 +                <code>undefined</code> as value if a record exists, or no cursor if no such record exists.
    4.26 +              </p>
    4.27                <dl class="parameters">
    4.28                  <dt>any key</dt>
    4.29                  <dd>Key identifying the <a>record</a> to be retrieved. This can also be a <a>IDBKeyRange</a> in which case
    4.30 @@ -700,10 +708,29 @@
    4.31                  <dd>The <var>key</var> parameter was not passed a valid value.</dd>
    4.32                </dl>
    4.33              </dd>
    4.34 +            <dt>IDBRequest clear()</dt>
    4.35 +            <dd>
    4.36 +              <p>
    4.37 +                This method throws a READ_ONLY_ERR if the transaction which this IDBObjectStore belongs to is
    4.38 +                has its <a>mode</a> set to READ_ONLY.
    4.39 +              </p>
    4.40 +              <p>
    4.41 +                Otherwise this method runs the <a>steps for asynchronously executing a request</a> and returns the
    4.42 +                <a>IDBRequest</a> created by these steps. The steps are run with this <a>IDBObjectStore</a> as
    4.43 +                <var>source</var> and the <a>steps for clearing an object store</a> as <var>operation</var>, using
    4.44 +                this <a>IDBObjectStore</a> as <var>store</var>.
    4.45 +              </p>
    4.46 +              <dl class="exception" title="IDBDatabaseException">
    4.47 +                <dt>TRANSACTION_INACTIVE_ERR</dt>
    4.48 +                <dd>The <a>transaction</a> this <a>IDBObjectStore</a> belongs to is not <a>active</a>.</dd>
    4.49 +                <dt>READ_ONLY_ERR</dt>
    4.50 +                <dd>The <a>mode</a> of the <a>transaction</a> this <a>IDBObjectStore</a> belongs to is READ_ONLY.</dd>
    4.51 +              </dl>
    4.52 +            </dd>
    4.53              <dt>IDBRequest openCursor()</dt>
    4.54              <dd>
    4.55                <p>
    4.56 -                If the <var>range</var> parameter is specified but is not a valid <a>key value</a> or a <a>key range</a>,
    4.57 +                If the <var>range</var> parameter is specified but is not a <a>valid key</a> or a <a>key range</a>,
    4.58                  this method throws a DATA_ERR exception. Otherwise, this method creates a <a>cursor</a> with an undefined
    4.59                  <a>position</a>, a <a>direction</a> set to the value of the <var>direction</var> parameter, false as
    4.60                  <a>iterable</a> flag value, and undefined <a title="cursor key">key</a> and
    4.61 @@ -838,7 +865,7 @@
    4.62              <dt>IDBRequest openCursor()</dt>
    4.63              <dd>
    4.64                <p>
    4.65 -                If the <var>range</var> parameter is specified but is not a valid <a>key value</a> or a <a>key range</a>,
    4.66 +                If the <var>range</var> parameter is specified but is not a <a>valid key</a> or a <a>key range</a>,
    4.67                  this method throws a DATA_ERR exception. Otherwise, this method creates a <a>cursor</a> with an undefined
    4.68                  <a>position</a>, a <a>direction</a> set to the value of the <var>direction</var> parameter, false as
    4.69                  <a>iterable</a> flag value, and undefined <a title="cursor key">key</a> and
    4.70 @@ -873,7 +900,7 @@
    4.71              <dt>IDBRequest openKeyCursor()</dt>
    4.72              <dd>
    4.73                <p>
    4.74 -                If the <var>range</var> parameter is specified but is not a valid <a>key value</a> or a <a>key range</a>,
    4.75 +                If the <var>range</var> parameter is specified but is not a <a>valid key</a> or a <a>key range</a>,
    4.76                  this method throws a DATA_ERR exception. Otherwise, this method creates a <a>cursor</a> with an undefined
    4.77                  <a>position</a>, a <a>direction</a> set to the value of the <var>direction</var> parameter, false as
    4.78                  <a>iterable</a> flag value, and undefined <a title="cursor key">key</a> and
    4.79 @@ -907,12 +934,20 @@
    4.80              </dd>
    4.81              <dt>IDBRequest get()</dt>
    4.82              <dd>
    4.83 -              If the <var>key</var> parameter is not a valid <a>key value</a> or a <a>key range</a>, this method
    4.84 -              throws a DATA_ERR exception. This method runs the <a>steps for asynchronously executing a request</a>
    4.85 -              and returns the <a>IDBRequest</a> created by these steps. The steps are run with this
    4.86 -              <a>IDBObjectStore</a> as <var>source</var> and the <a>steps for retrieving a referenced value from an
    4.87 -              index</a> as <var>operation</var>, using this <a>IDBIndex</a> as <var>index</var> and the
    4.88 -              <var>key</var> parameter as <var>key</var>.
    4.89 +              <p>
    4.90 +                If the <var>key</var> parameter is not a <a>valid key</a> or a <a>key range</a>, this method
    4.91 +                throws a DATA_ERR exception. This method runs the <a>steps for asynchronously executing a request</a>
    4.92 +                and returns the <a>IDBRequest</a> created by these steps. The steps are run with this
    4.93 +                <a>IDBObjectStore</a> as <var>source</var> and the <a>steps for retrieving a referenced value from an
    4.94 +                index</a> as <var>operation</var>, using this <a>IDBIndex</a> as <var>index</var> and the
    4.95 +                <var>key</var> parameter as <var>key</var>.
    4.96 +              </p>
    4.97 +              <p class="note">
    4.98 +                This function produces the same result if a record with the given key doesn't exist as when a record
    4.99 +                exists, but has <code>undefined</code> as value. If you need to tell the two situations apart, you can use
   4.100 +                <a href="#widl-IDBIndex-openCursor">openCursor</a> with the same key. This will return a cursor with
   4.101 +                <code>undefined</code> as value if a record exists, or no cursor if no such record exists.
   4.102 +              </p>
   4.103                <dl class="parameters">
   4.104                  <dt>any key</dt>
   4.105                  <dd>Key identifying the record to be retrieved. This can also be a <a>IDBKeyRange</a> in which case
   4.106 @@ -927,12 +962,20 @@
   4.107              </dd>
   4.108              <dt>IDBRequest getKey()</dt>
   4.109              <dd>
   4.110 -              If the <var>key</var> parameter is not a valid <a>key value</a> or a <a>key range</a>, this method
   4.111 -              throws a DATA_ERR exception. This method runs the <a>steps for asynchronously executing a request</a>
   4.112 -              and returns the <a>IDBRequest</a> created by these steps. The steps are run with this
   4.113 -              <a>IDBObjectStore</a> as <var>source</var> and the <a>steps for retrieving a value from an
   4.114 -              index</a> as <var>operation</var>, using this <a>IDBIndex</a> as <var>index</var> and the
   4.115 -              <var>key</var> parameter as <var>key</var>.
   4.116 +              <p>
   4.117 +                If the <var>key</var> parameter is not a <a>valid key</a> or a <a>key range</a>, this method
   4.118 +                throws a DATA_ERR exception. This method runs the <a>steps for asynchronously executing a request</a>
   4.119 +                and returns the <a>IDBRequest</a> created by these steps. The steps are run with this
   4.120 +                <a>IDBObjectStore</a> as <var>source</var> and the <a>steps for retrieving a value from an
   4.121 +                index</a> as <var>operation</var>, using this <a>IDBIndex</a> as <var>index</var> and the
   4.122 +                <var>key</var> parameter as <var>key</var>.
   4.123 +              </p>
   4.124 +              <p class="note">
   4.125 +                This function produces the same result if a record with the given key doesn't exist as when a record
   4.126 +                exists, but has <code>undefined</code> as value. If you need to tell the two situations apart, you can use
   4.127 +                <a href="#widl-IDBIndex-openKeyCursor">openKeyCursor</a> with the same key. This will return a cursor with
   4.128 +                <code>undefined</code> as value if a record exists, or no cursor if no such record exists.
   4.129 +              </p>
   4.130                <dl class="parameters">
   4.131                  <dt>any key</dt>
   4.132                  <dd>Key identifying the record to be retrieved. This can also be a <a>IDBKeyRange</a> in which case