Fix 9790 and fix breakages introduced in 837696f7a12e.
authorAndrei Popescu <andreip@google.com>
Tue, 22 Jun 2010 14:55:14 +0100
changeset 28378e74fd2c7a
parent 27 b4fe8b38a26c
child 30 b2aa59ed3ea8
Fix 9790 and fix breakages introduced in 837696f7a12e.
Overview.html
Speclet_020_IDB_API_Constructs.html
Speclet_022_IDB_API_Synchronous_APIs.html
Speclet_023_IDB_API_Asynchronous_APIs.html
     1.1 --- a/Overview.html	Tue Jun 22 18:59:06 2010 +0800
     1.2 +++ b/Overview.html	Tue Jun 22 14:55:14 2010 +0100
     1.3 @@ -433,40 +433,9 @@
     1.4              The detached reading behavior MAY need more explanation.
     1.5            </div-->
     1.6            <p>
     1.7 -            The <a><code>IDBObjectStore</code></a> interface provides access to 
     1.8 -            the metadata of an <a>object store</a>.
     1.9 +            The <a><code>IDBObjectStore</code></a> and <a><code>IDBObjectStoreSync</code></a>
    1.10 +            interfaces provide access to the metadata of an <a>object store</a>.
    1.11            </p>
    1.12 -          <dl title="interface IDBObjectStore" class="idl">
    1.13 -            <dt>const     unsigned short READ_WRITE    = 0</dt>
    1.14 -            <dd>Modification operations are allowed on the <a>object store</a>
    1.15 -            in this mode.</dd>
    1.16 -            <dt>const     unsigned short READ_ONLY    = 1</dt>
    1.17 -            <dd>Modification operations are not allowed on the <a>object 
    1.18 -            store</a> in this mode.</dd>
    1.19 -            <dt>const     unsigned short SNAPSHOT_READ = 2</dt>
    1.20 -            <dd>This mode is used solely for reading from a snapshot of the data
    1.21 -            in the <a>object store</a>.</dd>
    1.22 -            <dt>readonly attribute unsigned short mode</dt>
    1.23 -            <dd>On getting, provide the <a>mode</a> for isolating access to data 
    1.24 -            inside this <a>object store</a></dd>
    1.25 -            <dt>readonly attribute DOMString      name</dt>
    1.26 -            <dd>          
    1.27 -              On getting, provide the <a title="object store name">name</a> of 
    1.28 -              this object store.        
    1.29 -            </dd>
    1.30 -            <dt>readonly attribute DOMString      keyPath</dt>
    1.31 -            <dd>
    1.32 -              On getting, provide the 
    1.33 -              <a title="object store key path">key path</a> of this 
    1.34 -              <a>object store</a>. If this attribute is <code>null</code>,
    1.35 -              the application MUST provide a key value for each modification operation.
    1.36 -            </dd>
    1.37 -            <dt>readonly attribute DOMStringList  indexNames</dt>
    1.38 -            <dd>
    1.39 -            On getting, provide a list of the names of 
    1.40 -            <a title="index">indexes</a> on objects in this <a>object store</a>.
    1.41 -            </dd>
    1.42 -          </dl>
    1.43          </section> <!-- Object store -->
    1.44          
    1.45          <section id="index-concept" class="section">
    1.46 @@ -508,34 +477,9 @@
    1.47              <li><a>index</a> record value = <a>object store</a> record key</li>
    1.48            </ul>
    1.49            <p>
    1.50 -            The <a><code>IDBIndex</code></a> interface provides the metadata
    1.51 -            of an <a>index</a>.
    1.52 +            The <a><code>IDBIndex</code></a> and <a><code>IDBIndexSync</code></a> interfaces
    1.53 +            provide access to the metadata of an <a>index</a>.
    1.54            </p>
    1.55 -          <dl class="idl" title="interface IDBIndex">
    1.56 -            <dt>readonly attribute DOMString      name</dt>
    1.57 -            <dd>
    1.58 -              On getting, provide the <a title="index name">name</a> of this 
    1.59 -              <a>index</a>.        
    1.60 -            </dd>
    1.61 -            <dt>readonly attribute DOMString      storeName</dt>
    1.62 -            <dd>
    1.63 -              On getting, provide the <a title="object store name">name</a> of 
    1.64 -              this <a title="index">index's</a> <a>referenced</a> 
    1.65 -              <a>object store</a>.
    1.66 -            </dd>
    1.67 -        
    1.68 -            <dt>readonly attribute DOMString      keyPath</dt>
    1.69 -            <dd>
    1.70 -              On getting, provide the <a title="index key path">key path<a> of 
    1.71 -              this <a>index</a>. If this attribute is <code>null</code>,
    1.72 -              this <a>index</a> is not <a>auto-populated</a>.
    1.73 -            </dd>
    1.74 -            
    1.75 -            <dt>readonly attribute boolean unique</dt>
    1.76 -            <dd>
    1.77 -              On getting, provide the <a>unique</a> flag of this <a>index</a>.
    1.78 -            </dd>
    1.79 -          </dl>  
    1.80          </section> <!-- IDBIndex -->
    1.81          
    1.82         <section id="database-concept" class="section">
    1.83 @@ -576,42 +520,9 @@
    1.84              zero or one <dfn>active</dfn> <a>transaction</a>s.
    1.85            </p>
    1.86            <p>
    1.87 -            An <a><code>IDBDatabase</code></a> object represents a 
    1.88 -            <a>connection</a> to a <a>database</a>. 
    1.89 +            <a><code>IDBDatabase</code></a> and <a><code>IDBDatabaseSync</code></a>
    1.90 +            interfaces represent <a title="connection">connections</a> to a <a>database</a>. 
    1.91            </p>
    1.92 -          
    1.93 -          <dl title="[NoInterfaceObject] interface IDBDatabase" class="idl">   
    1.94 -            <dt>readonly attribute DOMString name</dt>
    1.95 -            <dd>
    1.96 -              On getting, this attribute MUST return the 
    1.97 -              <a title="database name">name</a>
    1.98 -              of the <a title="connection">connected</a> <a>database</a>.
    1.99 -            </dd>
   1.100 -            <dt>readonly attribute DOMString description</dt>  
   1.101 -            <dd>
   1.102 -              On getting, this attribute MUST return the description of the
   1.103 -              <a title="connection">connected</a> <a>database</a>.
   1.104 -            </dd>
   1.105 -            <dt>readonly attribute DOMString version</dt>
   1.106 -            <dd>
   1.107 -              On getting, this attribute MUST return the <a>version</a> of this
   1.108 -              <a>database</a>. This attribute has the <a>null</a> value when the
   1.109 -              <a title="connection">connected</a> <a>database</a> is first 
   1.110 -              created.
   1.111 -            </dd>
   1.112 -            <dt>readonly attribute DOMStringList objectStores</dt>
   1.113 -            <dd>
   1.114 -              On getting, this attribute MUST return a list of names of the 
   1.115 -              <a title="object store">object stores</a> currently in the 
   1.116 -              <a title="connection">connected</a> <a>database</a>.
   1.117 -            </dd>
   1.118 -            <dt>readonly attribute IDBTransactionList transactions</dt>
   1.119 -            <dd>
   1.120 -              On getting, this attribute MUST return a sequence of
   1.121 -              <a><code>IDBTransaction</code></a> objects
   1.122 -              corresponding to the <a>transactions</a> that are <a>active</a> in this <a>database</a> <a>connection</a>.
   1.123 -            </dd>
   1.124 -          </dl>
   1.125          </section>  <!-- IDBDatabase -->
   1.126          
   1.127          <section class="section" id="range-concept">
   1.128 @@ -716,42 +627,12 @@
   1.129              this series, which moves in a <dfn>direction</dfn> that is either 
   1.130              monotonically increasing or decreasing order of the record keys. 
   1.131            </p>
   1.132 -          
   1.133 -          <dl title="[NoInterfaceObject] interface IDBCursor" class="idl">
   1.134 -            <dt>const     unsigned short     NEXT = 0</dt>
   1.135 -            <dd>
   1.136 -              indicates that this <a>cursor</a> should yield all records, 
   1.137 -              including duplicates and its <a>direction</a> is monotonically 
   1.138 -              increasing order of keys.
   1.139 -            </dd>
   1.140 -            <dt>const     unsigned short     NEXT_NO_DUPLICATE = 1</dt>
   1.141 -            <dd>
   1.142 -              indicates that this <a>cursor</a> should yield all records, not 
   1.143 -              including duplicates and its <a>direction</a> is monotonically 
   1.144 -              increasing order of keys. For every key with duplicate values, 
   1.145 -              only the first record is yielded.
   1.146 -            </dd>
   1.147 -            <dt>const     unsigned short     PREV = 2</dt>
   1.148 -            <dd>
   1.149 -              indicates that <a>cursor</a> should yield all records, including  
   1.150 -              duplicates and its <a>direction</a> is monotonically decreasing 
   1.151 -              order of keys.
   1.152 -            </dd>
   1.153 -            <dt>const     unsigned short     PREV_NO_DUPLICATE = 3</dt>
   1.154 -            <dd>
   1.155 -              indicates that this <a>cursor</a> should yield all records, not 
   1.156 -              including duplicates and its <a>direction</a> is monotonically 
   1.157 -              decreasing order of keys. For every key with duplicate values, 
   1.158 -              only the first record is yielded.
   1.159 -            </dd>
   1.160 +          <p>
   1.161 +            <a title="cursor">Cursor</a> objects implement the <a><code>IDBCursor</code></a> 
   1.162 +            or the <a><code>IDBCursorSync</code></a> interfaces.
   1.163 +          </p>
   1.164 +        </section> <!-- IDBCursor -->
   1.165  
   1.166 -            <dt>readonly attribute unsigned short     direction</dt>
   1.167 -            <dd>            
   1.168 -            On getting, provide the traversal <a>direction</a> of the <a>cursor</a>.
   1.169 -            </dd>
   1.170 -          </dl>          
   1.171 -        </section> <!-- IDBCursor -->
   1.172 -        
   1.173          <section id="transaction-concept" class="section">
   1.174            <h4>Transaction</h4>
   1.175            <p>
   1.176 @@ -789,26 +670,81 @@
   1.177              created, if an exception is propagated to that scope.
   1.178              </li>
   1.179            </ul>
   1.180 -          <dl class="idl" title="interface IDBTransaction">
   1.181 -            <dt>attribute boolean static</dt>
   1.182 -            <dd>If <code>true</code>, then this <a>transaction</a> is 
   1.183 -            <a>static</a> and <code>false</code> otherwise.
   1.184 -            <dt>attribute IDBDatabase db</dt>
   1.185 -            <dd>The <a>database</a> <a>connection</a> of which this 
   1.186 -            <a>transaction</a> is a part</dd>
   1.187 -            <dt>attribute DOMStringList scope</dt>
   1.188 -            <dd>The names of <a>object store</a>s that are included in the scope 
   1.189 -            of this <a>transaction</a></dd>
   1.190 +          <p>
   1.191 +            <a title="transaction">Transaction</a> objects implement the 
   1.192 +            <a><code>IDBTransaction</code></a> or the
   1.193 +            <a><code>IDBTransactionSync</code></a> interfaces.
   1.194 +          </p>
   1.195 +        </section> <!-- IDBTransaction -->
   1.196 +        <section class="section">
   1.197 +          <h3>The <code>IDBDatabaseException</code> Interface</h3>
   1.198 +          <dl class="idl" title="exception IDBDatabaseException">
   1.199 +            <dt>const unsigned short UNKNOWN_ERR = 0</dt>
   1.200 +            <dd>The operation failed for reasons unrelated to the database
   1.201 +              itself and not covered by any other error code.</dd>
   1.202 +            <dt>const unsigned short NON_TRANSIENT_ERR = 1</dt>
   1.203 +            <dd>This error occurred because an operation was not allowed on 
   1.204 +            an object. A retry of the same operation would fail unless the
   1.205 +            cause of the error is corrected.</dd>
   1.206 +            <dt>const unsigned short NOT_FOUND_ERR = 2</dt>
   1.207 +            <dd>The operation failed because the requested database
   1.208 +            object could not be found. For example, an object store
   1.209 +            did not exist but was being opened.</dd>
   1.210 +            <dt>const unsigned short CONSTRAINT_ERR = 3</dt>
   1.211 +            <dd>A mutation operation in the transaction failed due to a
   1.212 +            because a constraint was not satisfied. For example, an
   1.213 +            object such as an object store or index already
   1.214 +            exists and a new one was being attempted to be created.</dd>
   1.215 +            <dt>const unsigned short DATA_ERR = 4</dt>
   1.216 +            <dd>Data provided to an operation does not meet requirements.</dd>
   1.217 +            <dt>const unsigned short NOT_ALLOWED_ERR = 5</dt>
   1.218 +            <dd>A mutation operation was attempted on a database that
   1.219 +            did not allow mutations.</dd>
   1.220 +            <dt>const unsigned short SERIAL_ERR = 11</dt>
   1.221 +            <dd>The operation failed because of the size of the data set 
   1.222 +            being returned or because there was a problem in serializing or 
   1.223 +            deserializing the object being processed.</dd>
   1.224 +            <dt>const unsigned short RECOVERABLE_ERR = 21</dt>
   1.225 +            <dd>The operation failed because the database was prevented
   1.226 +            from taking an action. The operation might be able to succeed
   1.227 +            if the application performs some recovery steps and retries
   1.228 +            the entire transaction. For example, there was not enough 
   1.229 +            remaining storage space, or the storage quota was reached
   1.230 +            and the user declined to give more space to the database.</dd>
   1.231 +            <!--const unsigned short QUOTA_ERR = 22;
   1.232 +                <dd>The statement failed because there was not enough remaining
   1.233 +     storage space, or the storage quota was reached and the user
   1.234 +     declined to give more space to the database.</dd>-->
   1.235 +            <dt>const unsigned short TRANSIENT_ERR = 31</dt>
   1.236 +            <dd>The operation failed because of some temporary problems.
   1.237 +            The failed operation might be able to succeed when the
   1.238 +            operation is retried without any intervention by 
   1.239 +            application-level functionality.</dd>
   1.240 +            <dt>const unsigned short TIMEOUT_ERR = 32</dt>
   1.241 +            <dd>A lock for the transaction could not be obtained in a
   1.242 +            reasonable time.</dd>
   1.243 +            <dt>const unsigned short DEADLOCK_ERR = 33</dt>
   1.244 +            <dd>The current transaction was automatically rolled back
   1.245 +            by the database because of deadlock or other transaction
   1.246 +            serialization failures.</dd>
   1.247 +            <dt>attribute unsigned short code</dt>
   1.248 +            <dd>
   1.249 +              Return the most appropriate error code.
   1.250 +            </dd>
   1.251 +            <dt>attribute DOMString message</dt>
   1.252 +            <dd>
   1.253 +              Return an error message describing the exception raised. 
   1.254 +              The message should be localized to the user's language.
   1.255 +            </dd>
   1.256            </dl>
   1.257 -        </section> <!-- IDBTransaction -->
   1.258 +        </section>
   1.259        </section>  
   1.260        <section class="section" id="async-api"> 
   1.261          <h3>Asynchronous APIs</h3>
   1.262          <p>
   1.263 -          The asynchronous API returns without blocking the calling thread.
   1.264 -          Asynchronous APIs are essentially the same as the synchronous ones 
   1.265 -          except that the result of an operation is not available when the 
   1.266 -          operation returns.
   1.267 +          The asynchronous API methods return without blocking the calling thread.
   1.268 +          All asynchronous operations return an <a><code>IDBRequest</code></a> instance,
   1.269 +          which can be used to access the results of the operation as they become available.
   1.270          </p>
   1.271          <section class="section" id="events">
   1.272            <h4>Event interfaces</h4>
   1.273 @@ -980,7 +916,7 @@
   1.274          </section>
   1.275          
   1.276          <section class="section" id="requests">
   1.277 -          <h4>Asynchronous Request API</h4>
   1.278 +          <h4>Opening a database</h4>
   1.279           <p>
   1.280              <a title="Window"><a class="externalDFN"><code>Window</code></a> and 
   1.281              <a title="Worker"><a class="externalDFN"><code>Worker</code></a> objects 
   1.282 @@ -991,7 +927,7 @@
   1.283            </p>
   1.284            
   1.285            <dl class="idl" title="[NoInterfaceObject] interface IDBEnvironment">
   1.286 -            <dt>readonly attribute IDBFactoryRequest indexedDB</dt>
   1.287 +            <dt>readonly attribute IDBFactory indexedDB</dt>
   1.288              <dd>This attribute provides applications a mechanism for accessing
   1.289                capabilities of indexed databases.</dd>
   1.290            </dl>
   1.291 @@ -1002,7 +938,8 @@
   1.292              This design means that any number of requests can be active on any <a>database</a>
   1.293              or <a title="objects">object</a> handle at a time. 
   1.294            </p>
   1.295 -          <dl class="idl" title="[NoInterfaceObject] interface IDBFactoryRequest">
   1.296 +
   1.297 +          <dl class="idl" title="[NoInterfaceObject] interface IDBFactory">
   1.298              <dt>readonly attribute DOMStringList databases</dt>
   1.299              <dd>
   1.300              This value is the list of the names of databases available in the global scope object.
   1.301 @@ -1039,8 +976,8 @@
   1.302                    code and abort these steps.
   1.303                  </li>
   1.304                  <li>
   1.305 -                  Create a <a><code>IDBDatabaseRequest</code></a> object for 
   1.306 -                  <var>result</var> and call it <var>db</var>.
   1.307 +                  Create a <a><code>IDBDatabase</code></a> object for <var>result</var>
   1.308 +                  and call it <var>db</var>.
   1.309                  </li>
   1.310                  <li>
   1.311                    Fire a <a title="event-success">success event</a> on this 
   1.312 @@ -1060,7 +997,44 @@
   1.313                </dl>
   1.314              </dd>
   1.315            </dl>
   1.316 -          <dl class="idl" title="[NoInterfaceObject] interface IDBDatabaseRequest : IDBDatabase">
   1.317 +        </section>
   1.318 +        <section id="database-interface" class="section">
   1.319 +          <h4>Database</h4>
   1.320 +          <!-- TODO Add example. Should examples be in a separate section?-->
   1.321 +          <p>
   1.322 +            A <a>database</a> object can be used to manipulate the 
   1.323 +            <a>objects</a> of that <a>database</a>. That is also the only way to 
   1.324 +            obtaining a <a>transaction</a> for that <a>database</a>.
   1.325 +          </p>
   1.326 +          <dl class="idl" title="[NoInterfaceObject] interface IDBDatabase">
   1.327 +            <dt>readonly attribute DOMString name</dt>
   1.328 +            <dd>
   1.329 +              On getting, this attribute MUST return the <a title="database name">name</a>
   1.330 +              of the <a title="connection">connected</a> <a>database</a>.
   1.331 +            </dd>
   1.332 +            <dt>readonly attribute DOMString description</dt>  
   1.333 +            <dd>
   1.334 +              On getting, this attribute MUST return the description of the
   1.335 +              <a title="connection">connected</a> <a>database</a>.
   1.336 +            </dd>
   1.337 +            <dt>readonly attribute DOMString version</dt>
   1.338 +            <dd>
   1.339 +              On getting, this attribute MUST return the <a>version</a> of this
   1.340 +              <a>database</a>. This attribute has the <a>null</a> value when the
   1.341 +              <a title="connection">connected</a> <a>database</a> is first created.
   1.342 +            </dd>
   1.343 +            <dt>readonly attribute DOMStringList objectStores</dt>
   1.344 +            <dd>
   1.345 +              On getting, this attribute MUST return a list of names of the 
   1.346 +              <a title="object store">object stores</a> currently in the 
   1.347 +              <a title="connection">connected</a> <a>database</a>.
   1.348 +            </dd>
   1.349 +            <dt>readonly attribute IDBTransaction currentTransaction</dt>
   1.350 +            <dd>
   1.351 +              On getting, this attribute MUST return a <a><code>IDBTransaction</code></a> object
   1.352 +              corresponding to the <a>transaction</a> that is <a>active</a> in this
   1.353 +              <a>database</a> <a>connection</a>.
   1.354 +            </dd>
   1.355              <dt>IDBRequest createObjectStore()</dt>
   1.356              <dd>
   1.357                <p>
   1.358 @@ -1084,7 +1058,7 @@
   1.359                  <a title="event-success">success event</a> is fired on this 
   1.360                  method's returned object using the <a><code>IDBTransactionEvent</code></a> interfacewith its 
   1.361                  <a class="idlType" href="#widl-IDBSuccessEvent-result"><code>result</code></a> set
   1.362 -                to a new <a><code>IDBObjectStoreRequest</code></a> for that <a>object store</a> and <a class="idlType" href="#widl-IDBTransactionEvent-transaction"><code>transaction</code></a> set
   1.363 +                to a new <a><code>IDBObjectStore</code></a> for that <a>object store</a> and <a class="idlType" href="#widl-IDBTransactionEvent-transaction"><code>transaction</code></a> set
   1.364                  to the <a>transaction</a> passed to this method.
   1.365                </p>
   1.366                <dl class="parameters">
   1.367 @@ -1113,7 +1087,7 @@
   1.368                returned object using the <a><code>IDBTransactionEvent</code></a> 
   1.369                interface with its 
   1.370                <a class="idlType" href="#widl-IDBSuccessEvent-result"><code>result</code></a> set to a new 
   1.371 -              <a><code>IDBObjectStoreRequest</code></a> for that <a>object store</a> and  <a class="idlType" href="#widl-IDBTransactionEvent-transaction"><code>transaction</code></a> 
   1.372 +              <a><code>IDBObjectStore</code></a> for that <a>object store</a> and  <a class="idlType" href="#widl-IDBTransactionEvent-transaction"><code>transaction</code></a> 
   1.373                set to a new <code>IDBTransactionRequest</code> for the 
   1.374                implicit <a>transaction</a>.
   1.375                <dl class="parameters">
   1.376 @@ -1151,7 +1125,7 @@
   1.377                  returned object using the <a><code>IDBTransactionEvent</code></a> 
   1.378                  interface with its 
   1.379                  <a class="idlType" href="#widl-IDBSuccessEvent-result"><code>result</code></a> set to a new 
   1.380 -                <a><code>IDBObjectStoreRequest</code></a> for that <a>object store</a> and <a class="idlType" href="#widl-IDBTransactionEvent-transaction"><code>transaction</code></a> set
   1.381 +                <a><code>IDBObjectStore</code></a> for that <a>object store</a> and <a class="idlType" href="#widl-IDBTransactionEvent-transaction"><code>transaction</code></a> set
   1.382                  to the <a>transaction</a> passed to this method.
   1.383                </p>              
   1.384                <dl class="parameters">
   1.385 @@ -1230,7 +1204,7 @@
   1.386                fired on this method's returned object using the 
   1.387                <a><code>IDBTransactionEvent</code></a> interface with its 
   1.388                <a class="idlType" href="#widl-IDBSuccessEvent-result"><code>result</code></a> set to 
   1.389 -              a new <a><code>IDBTransactionRequest</code></a> object and 
   1.390 +              a new <a><code>IDBTransaction</code></a> object and 
   1.391                <a class="idlType" href="#widl-IDBTransactionEvent-transaction"><code>transaction</code></a> 
   1.392                set to the <a>transaction</a> passed to this method. If reserving all the 
   1.393                <a>object store</a>s identified in the requested <a>scope</a> 
   1.394 @@ -1257,7 +1231,41 @@
   1.395                </dl>
   1.396              </dd>
   1.397            </dl>
   1.398 -          <dl class="idl" title="[NoInterfaceObject] interface IDBObjectStoreRequest : IDBObjectStore">
   1.399 +        </section>
   1.400 +        <section class="section" id="object-store-sync">  
   1.401 +          <h4>Object Store</h4>
   1.402 +          <a title="object store">Object store</a> objects implement the following
   1.403 +          interface:
   1.404 +          <dl class="idl" title="[NoInterfaceObject] interface IDBObjectStore">
   1.405 +            <dt>const     unsigned short READ_WRITE    = 0</dt>
   1.406 +            <dd>Modification operations are allowed on the <a>object store</a>
   1.407 +            in this mode.</dd>
   1.408 +            <dt>const     unsigned short READ_ONLY    = 1</dt>
   1.409 +            <dd>Modification operations are not allowed on the <a>object store</a>
   1.410 +            in this mode.</dd>
   1.411 +            <dt>const     unsigned short SNAPSHOT_READ = 2</dt>
   1.412 +            <dd>This mode is used solely for reading from a snapshot of the data
   1.413 +            in the <a>object store</a>.</dd>
   1.414 +
   1.415 +            <dt>readonly attribute unsigned short mode</dt>
   1.416 +            <dd>On getting, provide the <a>mode</a> for isolating access to data inside
   1.417 +            this <a>object store</a></dd>
   1.418 +            <dt>readonly attribute DOMString      name</dt>
   1.419 +            <dd>          
   1.420 +              On getting, provide the <a title="object store name">name</a> of this
   1.421 +              object store.        
   1.422 +            </dd>
   1.423 +            <dt>readonly attribute DOMString      keyPath</dt>
   1.424 +            <dd>
   1.425 +              On getting, provide the <a title="object store key path">key path</a>
   1.426 +              of this <a>object store</a>. If this attribute is <code>null</code>,
   1.427 +              the application MUST provide a key value for each modification operation.
   1.428 +            </dd>
   1.429 +            <dt>readonly attribute DOMStringList  indexNames</dt>
   1.430 +            <dd>
   1.431 +            On getting, provide a list of the names of <a title="index">indexes</a> on 
   1.432 +            objects in this <a>object store</a>.
   1.433 +            </dd>
   1.434              <dt>IDBRequest put()</dt>
   1.435              <dd>
   1.436                This method returns immediately and stores the given value in this 
   1.437 @@ -1405,7 +1413,7 @@
   1.438                <a title="event-success">success event</a> is fired on this method's
   1.439                returned object with its 
   1.440                <a class="idlType" href="#widl-IDBSuccessEvent-result"><code>result</code></a> set to the
   1.441 -              <a><code>IDBCursorRequest</code></a> object for that <a>cursor</a>. If no
   1.442 +              <a><code>IDBCursor</code></a> object for that <a>cursor</a>. If no
   1.443                records match the <a>key range</a>, then an 
   1.444                <a title="event-error">error event</a> is fired on this method's
   1.445                returned object with its 
   1.446 @@ -1447,7 +1455,7 @@
   1.447                  <a title="event-success">success event</a> is fired on this method's
   1.448                  returned object with its 
   1.449                  <a class="idlType" href="#widl-IDBSuccessEvent-result"><code>result</code></a> set to a new
   1.450 -                <a><code>IDBIndexRequest</code></a> for that <a>index</a>.
   1.451 +                <a><code>IDBIndex</code></a> for that <a>index</a>.
   1.452                </p>
   1.453                <dl class="parameters">
   1.454                  <dt>DOMString      name</dt>
   1.455 @@ -1463,7 +1471,7 @@
   1.456                  <dd>The <a>unique</a> flag for the new <a>index</a></dd>
   1.457                </dl>
   1.458              </dd>
   1.459 -            <dt>IDBIndexRequest index()</dt>
   1.460 +            <dt>IDBIndex index()</dt>
   1.461              <dd>
   1.462                <p>
   1.463                  This method returns immediately and opens the <a>index</a> with the
   1.464 @@ -1480,7 +1488,7 @@
   1.465                  <a title="event-success">success event</a> is fired on this method's
   1.466                  returned object with its 
   1.467                  <a class="idlType" href="#widl-IDBSuccessEvent-result"><code>result</code></a> set to a new 
   1.468 -                <a><code>IDBIndexRequest</code></a> for that <a>index</a>.
   1.469 +                <a><code>IDBIndex</code></a> for that <a>index</a>.
   1.470                </p>              
   1.471                <dl class="parameters">
   1.472                  <dt>DOMString name</dt>
   1.473 @@ -1507,8 +1515,36 @@
   1.474                </dl>
   1.475              </dd>
   1.476            </dl>
   1.477 -          <dl class="idl" title="[NoInterfaceObject] interface IDBIndexRequest : IDBIndex">
   1.478 -            <dt>IDBCursorRequest openObjectCursor()</dt>
   1.479 +        </section>
   1.480 +        <section class="section" id="index">
   1.481 +        <h4>Index</h4>
   1.482 +          <!-- TODO Add example. Should examples be in a separate section?-->
   1.483 +          <p>
   1.484 +            <a title="index">Index</a> objects implement the followin interface:
   1.485 +          </p>
   1.486 +          <dl class="idl" title="[NoInterfaceObject] interface IDBIndex">
   1.487 +            <dt>readonly attribute DOMString      name</dt>
   1.488 +            <dd>
   1.489 +              On getting, provide the <a title="index name">name</a> of this <a>index</a>.        
   1.490 +            </dd>
   1.491 +            <dt>readonly attribute DOMString      storeName</dt>
   1.492 +            <dd>
   1.493 +              On getting, provide the <a title="object store name">name</a> of this
   1.494 +              <a title="index">index's</a> <a>referenced</a> <a>object store</a>.
   1.495 +            </dd>
   1.496 +        
   1.497 +            <dt>readonly attribute DOMString      keyPath</dt>
   1.498 +            <dd>
   1.499 +              On getting, provide the <a title="index key path">key path<a> of this
   1.500 +              <a>index</a>. If this attribute is <code>null</code>,
   1.501 +              this <a>index</a> is not <a>auto-populated</a>.
   1.502 +            </dd>
   1.503 +            
   1.504 +            <dt>readonly attribute boolean unique</dt>
   1.505 +            <dd>
   1.506 +              On getting, provide the <a>unique</a> flag of this <a>index</a>.
   1.507 +            </dd>
   1.508 +            <dt>IDBCursor openObjectCursor()</dt>
   1.509              <dd>
   1.510                This method returns immediately and creates a <a>cursor</a> over the 
   1.511                <a>records</a> of this <a>index</a>'s <a>referenced</a> <a>object store</a> 
   1.512 @@ -1520,7 +1556,7 @@
   1.513                <a title="event-success">success event</a> is fired on this method's
   1.514                returned object with its 
   1.515                <a class="idlType" href="#widl-IDBSuccessEvent-result"><code>result</code></a> set to the
   1.516 -              <a><code>IDBCursorRequest</code></a> object for that <a>cursor</a>. If no
   1.517 +              <a><code>IDBCursor</code></a> object for that <a>cursor</a>. If no
   1.518                records match the <a>key range</a>, then an
   1.519                <a title="event-error">error event</a> is fired on this method's
   1.520                returned object with its 
   1.521 @@ -1546,7 +1582,7 @@
   1.522                <a title="event-success">success event</a> is fired on this method's
   1.523                returned object with its 
   1.524                <a class="idlType" href="#widl-IDBSuccessEvent-result"><code>result</code></a> set to the 
   1.525 -              <a><code>IDBCursorRequest</code></a> object for that <a>cursor</a>. If no
   1.526 +              <a><code>IDBCursor</code></a> object for that <a>cursor</a>. If no
   1.527                records match the <a>key range</a>, then an
   1.528                <a title="event-error">error event</a> is fired on this method's
   1.529                returned object with its 
   1.530 @@ -1658,7 +1694,45 @@
   1.531                </dl>
   1.532              </dd>
   1.533            </dl>
   1.534 -          <dl class="idl" title="[NoInterfaceObject] interface IDBCursorRequest : IDBCursor">
   1.535 +        </section>
   1.536 +        <section class="section" id="cursor">
   1.537 +          <h4>Cursor</h4>
   1.538 +          <!-- TODO Add example. Should examples be in a separate section?-->
   1.539 +          <p>
   1.540 +            <a title="cursor">Cursor</a> objects implement the following interface:
   1.541 +          </p>
   1.542 +          <dl class="idl" title="[NoInterfaceObject] interface IDBCursor">
   1.543 +  <dt>const     unsigned short     NEXT = 0</dt>
   1.544 +            <dd>
   1.545 +              indicates that this <a>cursor</a> should yield all records, including  
   1.546 +              duplicates and its <a>direction</a> is monotonically increasing 
   1.547 +              order of keys.
   1.548 +            </dd>
   1.549 +            <dt>const     unsigned short     NEXT_NO_DUPLICATE = 1</dt>
   1.550 +            <dd>
   1.551 +              indicates that this <a>cursor</a> should yield all records, not including
   1.552 +              duplicates and its <a>direction</a> is monotonically increasing 
   1.553 +              order of keys. For every key with duplicate values, only the first
   1.554 +              record is yielded.
   1.555 +            </dd>
   1.556 +            <dt>const     unsigned short     PREV = 2</dt>
   1.557 +            <dd>
   1.558 +              indicates that <a>cursor</a> should yield all records, including  
   1.559 +              duplicates and its <a>direction</a> is monotonically decreasing 
   1.560 +              order of keys.
   1.561 +            </dd>
   1.562 +            <dt>const     unsigned short     PREV_NO_DUPLICATE = 3</dt>
   1.563 +            <dd>
   1.564 +              indicates that this <a>cursor</a> should yield all records, not including
   1.565 +              duplicates and its <a>direction</a> is monotonically decreasing 
   1.566 +              order of keys. For every key with duplicate values, only the first
   1.567 +              record is yielded.
   1.568 +            </dd>
   1.569 +
   1.570 +            <dt>readonly attribute unsigned short     direction</dt>
   1.571 +            <dd>            
   1.572 +            On getting, provide the traversal <a>direction</a> of the <a>cursor</a>.
   1.573 +            </dd>
   1.574              <dt>readonly attribute any key</dt>
   1.575              <dd>The key for the record at the <a>cursor</a>'s <a>position</a>.</dd>
   1.576              <dt>readonly attribute any value</dt>
   1.577 @@ -1739,8 +1813,23 @@
   1.578                </p>
   1.579              </dd>
   1.580            </dl>
   1.581 -          <dl class="idl" title="[NoInterfaceObject] interface IDBTransactionRequest : IDBTransaction">
   1.582 -            <dt>IDBObjectStoreRequest objectStore()</dt>
   1.583 +        </section>
   1.584 +        <section class="section" id="transaction">
   1.585 +        <h4>Transaction</h4>
   1.586 +          <!-- TODO Add example. Should examples be in a separate section?-->
   1.587 +          <p>
   1.588 +            <a title="transaction">Transaction</a> objects implement the following interface:
   1.589 +          </p>
   1.590 +          <dl class="idl" title="[NoInterfaceObject] interface IDBTransaction : EventTarget">
   1.591 +            <dt>attribute boolean static</dt>
   1.592 +            <dd>If <code>true</code>, then this <a>transaction</a> is <a>static</a>
   1.593 +              and <code>false</code> otherwise.
   1.594 +            </dd>
   1.595 +            <dt>attribute IDBDatabase db</dt>
   1.596 +            <dd>The <a>database</a> <a>connection</a> of which this <a>transaction</a>
   1.597 +              is a part
   1.598 +            </dd>
   1.599 +            <dt>IDBObjectStore objectStore()</dt>
   1.600              <dd>
   1.601                Immediately returns the object store that has been already added 
   1.602                to the <a>scope</a> of this <a>transaction</a>. 
   1.603 @@ -1759,8 +1848,8 @@
   1.604              <dt>void abort()</dt>
   1.605              <dd>
   1.606                This method returns immediately and undoes all the changes performed to 
   1.607 -              the <a>objects</a> of this <a>database</a> in this <a>transaction</a>. If this <a>transaction</a> has already been committed
   1.608 -              or aborted,  then an
   1.609 +              the <a>objects</a> of this <a>database</a> in this <a>transaction</a>. If this <a>transaction</a> 
   1.610 +              has already been committed or aborted,  then an
   1.611                <a title="event-error">error event</a> is fired on this method's
   1.612                returned object with its 
   1.613                <a class="idlType" href="#widl-IDBErrorEvent-code"><code>code</code></a> set to
   1.614 @@ -1791,19 +1880,18 @@
   1.615                <a class="idlType" href="#widl-IDBErrorEvent-message"><code>message</code></a>.
   1.616              </dd>
   1.617              <dt>attribute Function onabort</dt>
   1.618 +            <dd>The event handler for the <a>onabort</a> event.</dd>
   1.619              <dt>attribute Function oncomplete</dt>
   1.620 +            <dd>The event handler for the <a>oncomplete</a> event.</dd>
   1.621              <dt>attribute Function ontimeout</dt>
   1.622 +            <dd>The event handler for the <a>ontimeout</a> event.</dd>
   1.623            </dl>
   1.624 -          <p class="idl" title="IDBTransactionRequest implements EventTarget">
   1.625          </section>
   1.626 -                  
   1.627 -      </section>            
   1.628 -    </section> <!-- API -->      
   1.629 -
   1.630 +      </section>
   1.631        <section id="sync-database" class="section">
   1.632          <h3>Synchronous APIs</h3>
   1.633          <section id="opening-sync" class="section">
   1.634 -          <h4>Opening a database connection</h4>
   1.635 +          <h4>Opening a database</h4>
   1.636            <p>
   1.637              <a title="Worker"><a class="externalDFN"><code>Worker</code></a></a> objects MUST implement the 
   1.638              <a><code>IDBEnvironmentSync</code></a> interface.
   1.639 @@ -1812,12 +1900,12 @@
   1.640            </p>
   1.641            
   1.642            <dl class="idl" title="[NoInterfaceObject] interface IDBEnvironmentSync">
   1.643 -            <dt>readonly attribute IDBFactory indexedDBSync</dt>
   1.644 +            <dt>readonly attribute IDBFactorySync indexedDBSync</dt>
   1.645              <dd>This attribute provides applications a mechanism for accessing
   1.646                capabilities of indexed databases.</dd>
   1.647            </dl>
   1.648            
   1.649 -          <dl class="idl" title="[NoInterfaceObject] interface IDBFactory">
   1.650 +          <dl class="idl" title="[NoInterfaceObject] interface IDBFactorySync">
   1.651              <dt>IDBDatabaseSync open()</dt>
   1.652              <dd>
   1.653                <dl class="parameters">
   1.654 @@ -1866,14 +1954,38 @@
   1.655            </dl>
   1.656          </section>
   1.657          
   1.658 -        <section id="database-interface" class="section">
   1.659 -          <h4>Database connection</h4>
   1.660 -          <p>
   1.661 -            A <a>database</a> <a>connection</a> can be used to manipulate the 
   1.662 -            <a>objects</a> of that <a>database</a>. That is also the only way to 
   1.663 -            obtaining a <a>transaction</a> for that <a>database</a>.
   1.664 -          </p>
   1.665 -          <dl class="idl" title="[NoInterfaceObject] interface IDBDatabaseSync : IDBDatabase">
   1.666 +        <section id="database-interface-sync" class="section">
   1.667 +          <h4>Database</h4>
   1.668 +          <!-- TODO Add example. Should examples be in a separate section?-->
   1.669 +          <dl class="idl" title="[NoInterfaceObject] interface IDBDatabaseSync">
   1.670 +            <dt>readonly attribute DOMString name</dt>
   1.671 +            <dd>
   1.672 +              On getting, this attribute MUST return the <a title="database name">name</a>
   1.673 +              of the <a title="connection">connected</a> <a>database</a>.
   1.674 +            </dd>
   1.675 +            <dt>readonly attribute DOMString description</dt>  
   1.676 +            <dd>
   1.677 +              On getting, this attribute MUST return the description of the
   1.678 +              <a title="connection">connected</a> <a>database</a>.
   1.679 +            </dd>
   1.680 +            <dt>readonly attribute DOMString version</dt>
   1.681 +            <dd>
   1.682 +              On getting, this attribute MUST return the <a>version</a> of this
   1.683 +              <a>database</a>. This attribute has the <a>null</a> value when the
   1.684 +              <a title="connection">connected</a> <a>database</a> is first created.
   1.685 +            </dd>
   1.686 +            <dt>readonly attribute DOMStringList objectStores</dt>
   1.687 +            <dd>
   1.688 +              On getting, this attribute MUST return a list of names of the 
   1.689 +              <a title="object store">object stores</a> currently in the 
   1.690 +              <a title="connection">connected</a> <a>database</a>.
   1.691 +            </dd>
   1.692 +            <dt>readonly attribute IDBTransactionSync currentTransaction</dt>
   1.693 +            <dd>
   1.694 +              On getting, this attribute MUST return a <a><code>IDBTransaction</code></a> object
   1.695 +              corresponding to the <a>transaction</a> that is <a>active</a> in this
   1.696 +              <a>database</a> <a>connection</a>.
   1.697 +            </dd>
   1.698              <dt>IDBObjectStoreSync createObjectStore()</dt>
   1.699              <dd>
   1.700                <p>
   1.701 @@ -2052,7 +2164,36 @@
   1.702  cursor.continue();</codeblock>
   1.703            </div>
   1.704            
   1.705 -          <dl title="[NoInterfaceObject] interface IDBObjectStoreSync : IDBObjectStore" class="idl">
   1.706 +          <dl title="[NoInterfaceObject] interface IDBObjectStoreSync" class="idl">
   1.707 +            <dt>const     unsigned short READ_WRITE    = 0</dt>
   1.708 +            <dd>Modification operations are allowed on the <a>object store</a>
   1.709 +            in this mode.</dd>
   1.710 +            <dt>const     unsigned short READ_ONLY    = 1</dt>
   1.711 +            <dd>Modification operations are not allowed on the <a>object store</a>
   1.712 +            in this mode.</dd>
   1.713 +            <dt>const     unsigned short SNAPSHOT_READ = 2</dt>
   1.714 +            <dd>This mode is used solely for reading from a snapshot of the data
   1.715 +            in the <a>object store</a>.</dd>
   1.716 +            <dt>readonly attribute unsigned short mode</dt>
   1.717 +            <dd>On getting, provide the <a>mode</a> for isolating access to data inside
   1.718 +            this <a>object store</a></dd>
   1.719 +            <dt>readonly attribute DOMString      name</dt>
   1.720 +            <dd>          
   1.721 +              On getting, provide the <a title="object store name">name</a> of this
   1.722 +              object store.        
   1.723 +            </dd>
   1.724 +            <dt>readonly attribute DOMString      keyPath</dt>
   1.725 +            <dd>
   1.726 +              On getting, provide the <a title="object store key path">key path</a>
   1.727 +              of this <a>object store</a>. If this attribute is <code>null</code>,
   1.728 +              the application MUST provide a key value for each modification operation.
   1.729 +            </dd>
   1.730 +            <dt>readonly attribute DOMStringList  indexNames</dt>
   1.731 +            <dd>
   1.732 +            On getting, provide a list of the names of <a title="index">indexes</a> on 
   1.733 +            objects in this <a>object store</a>.
   1.734 +            </dd>
   1.735 +          </dl>
   1.736              <dt>any put()</dt>
   1.737              <dd>
   1.738                Store the given value in this <a>object store</a> by following
   1.739 @@ -2260,7 +2401,28 @@
   1.740  cursor.continue();</codeblock>
   1.741            </div>
   1.742                
   1.743 -          <dl class="idl" title="[NoInterfaceObject] interface IDBIndexSync: IDBIndex">
   1.744 +          <dl class="idl" title="[NoInterfaceObject] interface IDBIndexSync">
   1.745 +            <dt>readonly attribute DOMString      name</dt>
   1.746 +            <dd>
   1.747 +              On getting, provide the <a title="index name">name</a> of this <a>index</a>.        
   1.748 +            </dd>
   1.749 +            <dt>readonly attribute DOMString      storeName</dt>
   1.750 +            <dd>
   1.751 +              On getting, provide the <a title="object store name">name</a> of this
   1.752 +              <a title="index">index's</a> <a>referenced</a> <a>object store</a>.
   1.753 +            </dd>
   1.754 +        
   1.755 +            <dt>readonly attribute DOMString      keyPath</dt>
   1.756 +            <dd>
   1.757 +              On getting, provide the <a title="index key path">key path<a> of this
   1.758 +              <a>index</a>. If this attribute is <code>null</code>,
   1.759 +              this <a>index</a> is not <a>auto-populated</a>.
   1.760 +            </dd>
   1.761 +            
   1.762 +            <dt>readonly attribute boolean unique</dt>
   1.763 +            <dd>
   1.764 +              On getting, provide the <a>unique</a> flag of this <a>index</a>.
   1.765 +            </dd>
   1.766              <dt>void openObjectCursor()</dt>
   1.767              <dd>
   1.768                Create a <a>cursor</a> over the <a>records</a> of this 
   1.769 @@ -2450,7 +2612,38 @@
   1.770  cursor.continue();
   1.771  </codeblock>
   1.772            </div>
   1.773 -          <dl title="[NoInterfaceObject] interface IDBCursorSync : IDBCursor" class="idl">
   1.774 +          <dl title="[NoInterfaceObject] interface IDBCursorSync" class="idl">
   1.775 +            <dt>const     unsigned short     NEXT = 0</dt>
   1.776 +            <dd>
   1.777 +              indicates that this <a>cursor</a> should yield all records, including  
   1.778 +              duplicates and its <a>direction</a> is monotonically increasing 
   1.779 +              order of keys.
   1.780 +            </dd>
   1.781 +            <dt>const     unsigned short     NEXT_NO_DUPLICATE = 1</dt>
   1.782 +            <dd>
   1.783 +              indicates that this <a>cursor</a> should yield all records, not including
   1.784 +              duplicates and its <a>direction</a> is monotonically increasing 
   1.785 +              order of keys. For every key with duplicate values, only the first
   1.786 +              record is yielded.
   1.787 +            </dd>
   1.788 +            <dt>const     unsigned short     PREV = 2</dt>
   1.789 +            <dd>
   1.790 +              indicates that <a>cursor</a> should yield all records, including  
   1.791 +              duplicates and its <a>direction</a> is monotonically decreasing 
   1.792 +              order of keys.
   1.793 +            </dd>
   1.794 +            <dt>const     unsigned short     PREV_NO_DUPLICATE = 3</dt>
   1.795 +            <dd>
   1.796 +              indicates that this <a>cursor</a> should yield all records, not including
   1.797 +              duplicates and its <a>direction</a> is monotonically decreasing 
   1.798 +              order of keys. For every key with duplicate values, only the first
   1.799 +              record is yielded.
   1.800 +            </dd>
   1.801 +
   1.802 +            <dt>readonly attribute unsigned short     direction</dt>
   1.803 +            <dd>            
   1.804 +            On getting, provide the traversal <a>direction</a> of the <a>cursor</a>.
   1.805 +            </dd>
   1.806              <dt>readonly attribute any key</dt>
   1.807              <dd>The key for the record at the <a>cursor</a>'s <a>position</a>.</dd>
   1.808              <dt>attribute any value</dt>
   1.809 @@ -2512,12 +2705,19 @@
   1.810          </section>
   1.811          <section id="transaction-sync" class="section">
   1.812            <h4>Transaction</h4>
   1.813 +          <!-- TODO Add example. Should examples be in a separate section?-->
   1.814            <p>
   1.815              When an application <a title="create a transaction">creates</a> a 
   1.816              <a>transaction</a> synchronously, it blocks until the user agent is able
   1.817              to reserve the required <a>database</a> <a>objects</a>.
   1.818            </p>
   1.819 -          <dl class="idl" title="[NoInterfaceObject] interface IDBTransactionSync : IDBTransaction">
   1.820 +          <dl class="idl" title="[NoInterfaceObject] interface IDBTransactionSync">
   1.821 +            <dt>attribute boolean static</dt>
   1.822 +            <dd>If <code>true</code>, then this <a>transaction</a> is <a>static</a>
   1.823 +              and <code>false</code> otherwise.
   1.824 +            <dt>attribute IDBDatabaseSync db</dt>
   1.825 +            <dd>The <a>database</a> <a>connection</a> of which this <a>transaction</a>
   1.826 +              is a part</dd>
   1.827              <dt>IDBObjectStoreSync objectStore()</dt>
   1.828              <dd>
   1.829                Immediately returns the object store that has been already added 
   1.830 @@ -2575,68 +2775,7 @@
   1.831              A new <a>transaction</a> can be created to perform operations atomically.
   1.832            </p>
   1.833          </section> <!-- IDBTransaction -->
   1.834 -        <section class="section">
   1.835 -          <h3>The <code>IDBDatabaseException</code> Interface</h3>
   1.836 -          <dl class="idl" title="exception IDBDatabaseException">
   1.837 -            <dt>const unsigned short UNKNOWN_ERR = 0</dt>
   1.838 -            <dd>The operation failed for reasons unrelated to the database
   1.839 -              itself and not covered by any other error code.</dd>
   1.840 -            <dt>const unsigned short NON_TRANSIENT_ERR = 1</dt>
   1.841 -            <dd>This error occurred because an operation was not allowed on 
   1.842 -            an object. A retry of the same operation would fail unless the
   1.843 -            cause of the error is corrected.</dd>
   1.844 -            <dt>const unsigned short NOT_FOUND_ERR = 2</dt>
   1.845 -            <dd>The operation failed because the requested database
   1.846 -            object could not be found. For example, an object store
   1.847 -            did not exist but was being opened.</dd>
   1.848 -            <dt>const unsigned short CONSTRAINT_ERR = 3</dt>
   1.849 -            <dd>A mutation operation in the transaction failed due to a
   1.850 -            because a constraint was not satisfied. For example, an
   1.851 -            object such as an object store or index already
   1.852 -            exists and a new one was being attempted to be created.</dd>
   1.853 -            <dt>const unsigned short DATA_ERR = 4</dt>
   1.854 -            <dd>Data provided to an operation does not meet requirements.</dd>
   1.855 -            <dt>const unsigned short NOT_ALLOWED_ERR = 5</dt>
   1.856 -            <dd>A mutation operation was attempted on a database that
   1.857 -            did not allow mutations.</dd>
   1.858 -            <dt>const unsigned short SERIAL_ERR = 11</dt>
   1.859 -            <dd>The operation failed because of the size of the data set 
   1.860 -            being returned or because there was a problem in serializing or 
   1.861 -            deserializing the object being processed.</dd>
   1.862 -            <dt>const unsigned short RECOVERABLE_ERR = 21</dt>
   1.863 -            <dd>The operation failed because the database was prevented
   1.864 -            from taking an action. The operation might be able to succeed
   1.865 -            if the application performs some recovery steps and retries
   1.866 -            the entire transaction. For example, there was not enough 
   1.867 -            remaining storage space, or the storage quota was reached
   1.868 -            and the user declined to give more space to the database.</dd>
   1.869 -            <!--const unsigned short QUOTA_ERR = 22;
   1.870 -                <dd>The statement failed because there was not enough remaining
   1.871 -     storage space, or the storage quota was reached and the user
   1.872 -     declined to give more space to the database.</dd>-->
   1.873 -            <dt>const unsigned short TRANSIENT_ERR = 31</dt>
   1.874 -            <dd>The operation failed because of some temporary problems.
   1.875 -            The failed operation might be able to succeed when the
   1.876 -            operation is retried without any intervention by 
   1.877 -            application-level functionality.</dd>
   1.878 -            <dt>const unsigned short TIMEOUT_ERR = 32</dt>
   1.879 -            <dd>A lock for the transaction could not be obtained in a
   1.880 -            reasonable time.</dd>
   1.881 -            <dt>const unsigned short DEADLOCK_ERR = 33</dt>
   1.882 -            <dd>The current transaction was automatically rolled back
   1.883 -            by the database because of deadlock or other transaction
   1.884 -            serialization failures.</dd>
   1.885 -            <dt>attribute unsigned short code</dt>
   1.886 -            <dd>
   1.887 -              Return the most appropriate error code.
   1.888 -            </dd>
   1.889 -            <dt>attribute DOMString message</dt>
   1.890 -            <dd>
   1.891 -              Return an error message describing the exception raised. 
   1.892 -              The message should be localized to the user's language.
   1.893 -            </dd>
   1.894 -          </dl>  
   1.895 -        </section>     
   1.896 +       </section>
   1.897        </section>
   1.898        <section class="section" id="algorithms">
   1.899          <h3>Algorithms</h3>
     2.1 --- a/Speclet_020_IDB_API_Constructs.html	Tue Jun 22 18:59:06 2010 +0800
     2.2 +++ b/Speclet_020_IDB_API_Constructs.html	Tue Jun 22 14:55:14 2010 +0100
     2.3 @@ -234,40 +234,9 @@
     2.4              The detached reading behavior MAY need more explanation.
     2.5            </div-->
     2.6            <p>
     2.7 -            The <a><code>IDBObjectStore</code></a> interface provides access to 
     2.8 -            the metadata of an <a>object store</a>.
     2.9 +            The <a><code>IDBObjectStore</code></a> and <a><code>IDBObjectStoreSync</code></a>
    2.10 +            interfaces provide access to the metadata of an <a>object store</a>.
    2.11            </p>
    2.12 -          <dl title="interface IDBObjectStore" class="idl">
    2.13 -            <dt>const     unsigned short READ_WRITE    = 0</dt>
    2.14 -            <dd>Modification operations are allowed on the <a>object store</a>
    2.15 -            in this mode.</dd>
    2.16 -            <dt>const     unsigned short READ_ONLY    = 1</dt>
    2.17 -            <dd>Modification operations are not allowed on the <a>object 
    2.18 -            store</a> in this mode.</dd>
    2.19 -            <dt>const     unsigned short SNAPSHOT_READ = 2</dt>
    2.20 -            <dd>This mode is used solely for reading from a snapshot of the data
    2.21 -            in the <a>object store</a>.</dd>
    2.22 -            <dt>readonly attribute unsigned short mode</dt>
    2.23 -            <dd>On getting, provide the <a>mode</a> for isolating access to data 
    2.24 -            inside this <a>object store</a></dd>
    2.25 -            <dt>readonly attribute DOMString      name</dt>
    2.26 -            <dd>          
    2.27 -              On getting, provide the <a title="object store name">name</a> of 
    2.28 -              this object store.        
    2.29 -            </dd>
    2.30 -            <dt>readonly attribute DOMString      keyPath</dt>
    2.31 -            <dd>
    2.32 -              On getting, provide the 
    2.33 -              <a title="object store key path">key path</a> of this 
    2.34 -              <a>object store</a>. If this attribute is <code>null</code>,
    2.35 -              the application MUST provide a key value for each modification operation.
    2.36 -            </dd>
    2.37 -            <dt>readonly attribute DOMStringList  indexNames</dt>
    2.38 -            <dd>
    2.39 -            On getting, provide a list of the names of 
    2.40 -            <a title="index">indexes</a> on objects in this <a>object store</a>.
    2.41 -            </dd>
    2.42 -          </dl>
    2.43          </section> <!-- Object store -->
    2.44          
    2.45          <section id="index-concept" class="section">
    2.46 @@ -309,34 +278,9 @@
    2.47              <li><a>index</a> record value = <a>object store</a> record key</li>
    2.48            </ul>
    2.49            <p>
    2.50 -            The <a><code>IDBIndex</code></a> interface provides the metadata
    2.51 -            of an <a>index</a>.
    2.52 +            The <a><code>IDBIndex</code></a> and <a><code>IDBIndexSync</code></a> interfaces
    2.53 +            provide access to the metadata of an <a>index</a>.
    2.54            </p>
    2.55 -          <dl class="idl" title="interface IDBIndex">
    2.56 -            <dt>readonly attribute DOMString      name</dt>
    2.57 -            <dd>
    2.58 -              On getting, provide the <a title="index name">name</a> of this 
    2.59 -              <a>index</a>.        
    2.60 -            </dd>
    2.61 -            <dt>readonly attribute DOMString      storeName</dt>
    2.62 -            <dd>
    2.63 -              On getting, provide the <a title="object store name">name</a> of 
    2.64 -              this <a title="index">index's</a> <a>referenced</a> 
    2.65 -              <a>object store</a>.
    2.66 -            </dd>
    2.67 -        
    2.68 -            <dt>readonly attribute DOMString      keyPath</dt>
    2.69 -            <dd>
    2.70 -              On getting, provide the <a title="index key path">key path<a> of 
    2.71 -              this <a>index</a>. If this attribute is <code>null</code>,
    2.72 -              this <a>index</a> is not <a>auto-populated</a>.
    2.73 -            </dd>
    2.74 -            
    2.75 -            <dt>readonly attribute boolean unique</dt>
    2.76 -            <dd>
    2.77 -              On getting, provide the <a>unique</a> flag of this <a>index</a>.
    2.78 -            </dd>
    2.79 -          </dl>  
    2.80          </section> <!-- IDBIndex -->
    2.81          
    2.82         <section id="database-concept" class="section">
    2.83 @@ -377,42 +321,9 @@
    2.84              zero or one <dfn>active</dfn> <a>transaction</a>s.
    2.85            </p>
    2.86            <p>
    2.87 -            An <a><code>IDBDatabase</code></a> object represents a 
    2.88 -            <a>connection</a> to a <a>database</a>. 
    2.89 +            <a><code>IDBDatabase</code></a> and <a><code>IDBDatabaseSync</code></a>
    2.90 +            interfaces represent <a title="connection">connections</a> to a <a>database</a>. 
    2.91            </p>
    2.92 -          
    2.93 -          <dl title="[NoInterfaceObject] interface IDBDatabase" class="idl">   
    2.94 -            <dt>readonly attribute DOMString name</dt>
    2.95 -            <dd>
    2.96 -              On getting, this attribute MUST return the 
    2.97 -              <a title="database name">name</a>
    2.98 -              of the <a title="connection">connected</a> <a>database</a>.
    2.99 -            </dd>
   2.100 -            <dt>readonly attribute DOMString description</dt>  
   2.101 -            <dd>
   2.102 -              On getting, this attribute MUST return the description of the
   2.103 -              <a title="connection">connected</a> <a>database</a>.
   2.104 -            </dd>
   2.105 -            <dt>readonly attribute DOMString version</dt>
   2.106 -            <dd>
   2.107 -              On getting, this attribute MUST return the <a>version</a> of this
   2.108 -              <a>database</a>. This attribute has the <a>null</a> value when the
   2.109 -              <a title="connection">connected</a> <a>database</a> is first 
   2.110 -              created.
   2.111 -            </dd>
   2.112 -            <dt>readonly attribute DOMStringList objectStores</dt>
   2.113 -            <dd>
   2.114 -              On getting, this attribute MUST return a list of names of the 
   2.115 -              <a title="object store">object stores</a> currently in the 
   2.116 -              <a title="connection">connected</a> <a>database</a>.
   2.117 -            </dd>
   2.118 -            <dt>readonly attribute IDBTransactionList transactions</dt>
   2.119 -            <dd>
   2.120 -              On getting, this attribute MUST return a sequence of
   2.121 -              <a><code>IDBTransaction</code></a> objects
   2.122 -              corresponding to the <a>transactions</a> that are <a>active</a> in this <a>database</a> <a>connection</a>.
   2.123 -            </dd>
   2.124 -          </dl>
   2.125          </section>  <!-- IDBDatabase -->
   2.126          
   2.127          <section class="section" id="range-concept">
   2.128 @@ -517,42 +428,12 @@
   2.129              this series, which moves in a <dfn>direction</dfn> that is either 
   2.130              monotonically increasing or decreasing order of the record keys. 
   2.131            </p>
   2.132 -          
   2.133 -          <dl title="[NoInterfaceObject] interface IDBCursor" class="idl">
   2.134 -            <dt>const     unsigned short     NEXT = 0</dt>
   2.135 -            <dd>
   2.136 -              indicates that this <a>cursor</a> should yield all records, 
   2.137 -              including duplicates and its <a>direction</a> is monotonically 
   2.138 -              increasing order of keys.
   2.139 -            </dd>
   2.140 -            <dt>const     unsigned short     NEXT_NO_DUPLICATE = 1</dt>
   2.141 -            <dd>
   2.142 -              indicates that this <a>cursor</a> should yield all records, not 
   2.143 -              including duplicates and its <a>direction</a> is monotonically 
   2.144 -              increasing order of keys. For every key with duplicate values, 
   2.145 -              only the first record is yielded.
   2.146 -            </dd>
   2.147 -            <dt>const     unsigned short     PREV = 2</dt>
   2.148 -            <dd>
   2.149 -              indicates that <a>cursor</a> should yield all records, including  
   2.150 -              duplicates and its <a>direction</a> is monotonically decreasing 
   2.151 -              order of keys.
   2.152 -            </dd>
   2.153 -            <dt>const     unsigned short     PREV_NO_DUPLICATE = 3</dt>
   2.154 -            <dd>
   2.155 -              indicates that this <a>cursor</a> should yield all records, not 
   2.156 -              including duplicates and its <a>direction</a> is monotonically 
   2.157 -              decreasing order of keys. For every key with duplicate values, 
   2.158 -              only the first record is yielded.
   2.159 -            </dd>
   2.160 +          <p>
   2.161 +            <a title="cursor">Cursor</a> objects implement the <a><code>IDBCursor</code></a> 
   2.162 +            or the <a><code>IDBCursorSync</code></a> interfaces.
   2.163 +          </p>
   2.164 +        </section> <!-- IDBCursor -->
   2.165  
   2.166 -            <dt>readonly attribute unsigned short     direction</dt>
   2.167 -            <dd>            
   2.168 -            On getting, provide the traversal <a>direction</a> of the <a>cursor</a>.
   2.169 -            </dd>
   2.170 -          </dl>          
   2.171 -        </section> <!-- IDBCursor -->
   2.172 -        
   2.173          <section id="transaction-concept" class="section">
   2.174            <h4>Transaction</h4>
   2.175            <p>
   2.176 @@ -590,20 +471,76 @@
   2.177              created, if an exception is propagated to that scope.
   2.178              </li>
   2.179            </ul>
   2.180 -          <dl class="idl" title="interface IDBTransaction">
   2.181 -            <dt>attribute boolean static</dt>
   2.182 -            <dd>If <code>true</code>, then this <a>transaction</a> is 
   2.183 -            <a>static</a> and <code>false</code> otherwise.
   2.184 -            <dt>attribute IDBDatabase db</dt>
   2.185 -            <dd>The <a>database</a> <a>connection</a> of which this 
   2.186 -            <a>transaction</a> is a part</dd>
   2.187 -            <dt>attribute DOMStringList scope</dt>
   2.188 -            <dd>The names of <a>object store</a>s that are included in the scope 
   2.189 -            of this <a>transaction</a></dd>
   2.190 +          <p>
   2.191 +            <a title="transaction">Transaction</a> objects implement the 
   2.192 +            <a><code>IDBTransaction</code></a> or the
   2.193 +            <a><code>IDBTransactionSync</code></a> interfaces.
   2.194 +          </p>
   2.195 +        </section> <!-- IDBTransaction -->
   2.196 +        <section class="section">
   2.197 +          <h3>The <code>IDBDatabaseException</code> Interface</h3>
   2.198 +          <dl class="idl" title="exception IDBDatabaseException">
   2.199 +            <dt>const unsigned short UNKNOWN_ERR = 0</dt>
   2.200 +            <dd>The operation failed for reasons unrelated to the database
   2.201 +              itself and not covered by any other error code.</dd>
   2.202 +            <dt>const unsigned short NON_TRANSIENT_ERR = 1</dt>
   2.203 +            <dd>This error occurred because an operation was not allowed on 
   2.204 +            an object. A retry of the same operation would fail unless the
   2.205 +            cause of the error is corrected.</dd>
   2.206 +            <dt>const unsigned short NOT_FOUND_ERR = 2</dt>
   2.207 +            <dd>The operation failed because the requested database
   2.208 +            object could not be found. For example, an object store
   2.209 +            did not exist but was being opened.</dd>
   2.210 +            <dt>const unsigned short CONSTRAINT_ERR = 3</dt>
   2.211 +            <dd>A mutation operation in the transaction failed due to a
   2.212 +            because a constraint was not satisfied. For example, an
   2.213 +            object such as an object store or index already
   2.214 +            exists and a new one was being attempted to be created.</dd>
   2.215 +            <dt>const unsigned short DATA_ERR = 4</dt>
   2.216 +            <dd>Data provided to an operation does not meet requirements.</dd>
   2.217 +            <dt>const unsigned short NOT_ALLOWED_ERR = 5</dt>
   2.218 +            <dd>A mutation operation was attempted on a database that
   2.219 +            did not allow mutations.</dd>
   2.220 +            <dt>const unsigned short SERIAL_ERR = 11</dt>
   2.221 +            <dd>The operation failed because of the size of the data set 
   2.222 +            being returned or because there was a problem in serializing or 
   2.223 +            deserializing the object being processed.</dd>
   2.224 +            <dt>const unsigned short RECOVERABLE_ERR = 21</dt>
   2.225 +            <dd>The operation failed because the database was prevented
   2.226 +            from taking an action. The operation might be able to succeed
   2.227 +            if the application performs some recovery steps and retries
   2.228 +            the entire transaction. For example, there was not enough 
   2.229 +            remaining storage space, or the storage quota was reached
   2.230 +            and the user declined to give more space to the database.</dd>
   2.231 +            <!--const unsigned short QUOTA_ERR = 22;
   2.232 +                <dd>The statement failed because there was not enough remaining
   2.233 +     storage space, or the storage quota was reached and the user
   2.234 +     declined to give more space to the database.</dd>-->
   2.235 +            <dt>const unsigned short TRANSIENT_ERR = 31</dt>
   2.236 +            <dd>The operation failed because of some temporary problems.
   2.237 +            The failed operation might be able to succeed when the
   2.238 +            operation is retried without any intervention by 
   2.239 +            application-level functionality.</dd>
   2.240 +            <dt>const unsigned short TIMEOUT_ERR = 32</dt>
   2.241 +            <dd>A lock for the transaction could not be obtained in a
   2.242 +            reasonable time.</dd>
   2.243 +            <dt>const unsigned short DEADLOCK_ERR = 33</dt>
   2.244 +            <dd>The current transaction was automatically rolled back
   2.245 +            by the database because of deadlock or other transaction
   2.246 +            serialization failures.</dd>
   2.247 +            <dt>attribute unsigned short code</dt>
   2.248 +            <dd>
   2.249 +              Return the most appropriate error code.
   2.250 +            </dd>
   2.251 +            <dt>attribute DOMString message</dt>
   2.252 +            <dd>
   2.253 +              Return an error message describing the exception raised. 
   2.254 +              The message should be localized to the user's language.
   2.255 +            </dd>
   2.256            </dl>
   2.257 -        </section> <!-- IDBTransaction -->
   2.258 +        </section>
   2.259        </section>  
   2.260        <!-- end-content -->
   2.261      </section>
   2.262    </body>
   2.263 -</html>
   2.264 \ No newline at end of file
   2.265 +</html>
     3.1 --- a/Speclet_022_IDB_API_Synchronous_APIs.html	Tue Jun 22 18:59:06 2010 +0800
     3.2 +++ b/Speclet_022_IDB_API_Synchronous_APIs.html	Tue Jun 22 14:55:14 2010 +0100
     3.3 @@ -131,12 +131,11 @@
     3.4      <section id="database-api" class="section">
     3.5        <h2>Indexed Database API</h2>
     3.6  
     3.7 -
     3.8        <!-- begin-content -->
     3.9        <section id="sync-database" class="section">
    3.10          <h3>Synchronous APIs</h3>
    3.11          <section id="opening-sync" class="section">
    3.12 -          <h4>Opening a database connection</h4>
    3.13 +          <h4>Opening a database</h4>
    3.14            <p>
    3.15              <a title="Worker"><a class="externalDFN"><code>Worker</code></a></a> objects MUST implement the 
    3.16              <a><code>IDBEnvironmentSync</code></a> interface.
    3.17 @@ -145,12 +144,12 @@
    3.18            </p>
    3.19            
    3.20            <dl class="idl" title="[NoInterfaceObject] interface IDBEnvironmentSync">
    3.21 -            <dt>readonly attribute IDBFactory indexedDBSync</dt>
    3.22 +            <dt>readonly attribute IDBFactorySync indexedDBSync</dt>
    3.23              <dd>This attribute provides applications a mechanism for accessing
    3.24                capabilities of indexed databases.</dd>
    3.25            </dl>
    3.26            
    3.27 -          <dl class="idl" title="[NoInterfaceObject] interface IDBFactory">
    3.28 +          <dl class="idl" title="[NoInterfaceObject] interface IDBFactorySync">
    3.29              <dt>IDBDatabaseSync open()</dt>
    3.30              <dd>
    3.31                <dl class="parameters">
    3.32 @@ -199,14 +198,38 @@
    3.33            </dl>
    3.34          </section>
    3.35          
    3.36 -        <section id="database-interface" class="section">
    3.37 -          <h4>Database connection</h4>
    3.38 -          <p>
    3.39 -            A <a>database</a> <a>connection</a> can be used to manipulate the 
    3.40 -            <a>objects</a> of that <a>database</a>. That is also the only way to 
    3.41 -            obtaining a <a>transaction</a> for that <a>database</a>.
    3.42 -          </p>
    3.43 -          <dl class="idl" title="[NoInterfaceObject] interface IDBDatabaseSync : IDBDatabase">
    3.44 +        <section id="database-interface-sync" class="section">
    3.45 +          <h4>Database</h4>
    3.46 +          <!-- TODO Add example. Should examples be in a separate section?-->
    3.47 +          <dl class="idl" title="[NoInterfaceObject] interface IDBDatabaseSync">
    3.48 +            <dt>readonly attribute DOMString name</dt>
    3.49 +            <dd>
    3.50 +              On getting, this attribute MUST return the <a title="database name">name</a>
    3.51 +              of the <a title="connection">connected</a> <a>database</a>.
    3.52 +            </dd>
    3.53 +            <dt>readonly attribute DOMString description</dt>  
    3.54 +            <dd>
    3.55 +              On getting, this attribute MUST return the description of the
    3.56 +              <a title="connection">connected</a> <a>database</a>.
    3.57 +            </dd>
    3.58 +            <dt>readonly attribute DOMString version</dt>
    3.59 +            <dd>
    3.60 +              On getting, this attribute MUST return the <a>version</a> of this
    3.61 +              <a>database</a>. This attribute has the <a>null</a> value when the
    3.62 +              <a title="connection">connected</a> <a>database</a> is first created.
    3.63 +            </dd>
    3.64 +            <dt>readonly attribute DOMStringList objectStores</dt>
    3.65 +            <dd>
    3.66 +              On getting, this attribute MUST return a list of names of the 
    3.67 +              <a title="object store">object stores</a> currently in the 
    3.68 +              <a title="connection">connected</a> <a>database</a>.
    3.69 +            </dd>
    3.70 +            <dt>readonly attribute IDBTransactionSync currentTransaction</dt>
    3.71 +            <dd>
    3.72 +              On getting, this attribute MUST return a <a><code>IDBTransaction</code></a> object
    3.73 +              corresponding to the <a>transaction</a> that is <a>active</a> in this
    3.74 +              <a>database</a> <a>connection</a>.
    3.75 +            </dd>
    3.76              <dt>IDBObjectStoreSync createObjectStore()</dt>
    3.77              <dd>
    3.78                <p>
    3.79 @@ -385,7 +408,36 @@
    3.80  cursor.continue();</codeblock>
    3.81            </div>
    3.82            
    3.83 -          <dl title="[NoInterfaceObject] interface IDBObjectStoreSync : IDBObjectStore" class="idl">
    3.84 +          <dl title="[NoInterfaceObject] interface IDBObjectStoreSync" class="idl">
    3.85 +            <dt>const     unsigned short READ_WRITE    = 0</dt>
    3.86 +            <dd>Modification operations are allowed on the <a>object store</a>
    3.87 +            in this mode.</dd>
    3.88 +            <dt>const     unsigned short READ_ONLY    = 1</dt>
    3.89 +            <dd>Modification operations are not allowed on the <a>object store</a>
    3.90 +            in this mode.</dd>
    3.91 +            <dt>const     unsigned short SNAPSHOT_READ = 2</dt>
    3.92 +            <dd>This mode is used solely for reading from a snapshot of the data
    3.93 +            in the <a>object store</a>.</dd>
    3.94 +            <dt>readonly attribute unsigned short mode</dt>
    3.95 +            <dd>On getting, provide the <a>mode</a> for isolating access to data inside
    3.96 +            this <a>object store</a></dd>
    3.97 +            <dt>readonly attribute DOMString      name</dt>
    3.98 +            <dd>          
    3.99 +              On getting, provide the <a title="object store name">name</a> of this
   3.100 +              object store.        
   3.101 +            </dd>
   3.102 +            <dt>readonly attribute DOMString      keyPath</dt>
   3.103 +            <dd>
   3.104 +              On getting, provide the <a title="object store key path">key path</a>
   3.105 +              of this <a>object store</a>. If this attribute is <code>null</code>,
   3.106 +              the application MUST provide a key value for each modification operation.
   3.107 +            </dd>
   3.108 +            <dt>readonly attribute DOMStringList  indexNames</dt>
   3.109 +            <dd>
   3.110 +            On getting, provide a list of the names of <a title="index">indexes</a> on 
   3.111 +            objects in this <a>object store</a>.
   3.112 +            </dd>
   3.113 +          </dl>
   3.114              <dt>any put()</dt>
   3.115              <dd>
   3.116                Store the given value in this <a>object store</a> by following
   3.117 @@ -593,7 +645,28 @@
   3.118  cursor.continue();</codeblock>
   3.119            </div>
   3.120                
   3.121 -          <dl class="idl" title="[NoInterfaceObject] interface IDBIndexSync: IDBIndex">
   3.122 +          <dl class="idl" title="[NoInterfaceObject] interface IDBIndexSync">
   3.123 +            <dt>readonly attribute DOMString      name</dt>
   3.124 +            <dd>
   3.125 +              On getting, provide the <a title="index name">name</a> of this <a>index</a>.        
   3.126 +            </dd>
   3.127 +            <dt>readonly attribute DOMString      storeName</dt>
   3.128 +            <dd>
   3.129 +              On getting, provide the <a title="object store name">name</a> of this
   3.130 +              <a title="index">index's</a> <a>referenced</a> <a>object store</a>.
   3.131 +            </dd>
   3.132 +        
   3.133 +            <dt>readonly attribute DOMString      keyPath</dt>
   3.134 +            <dd>
   3.135 +              On getting, provide the <a title="index key path">key path<a> of this
   3.136 +              <a>index</a>. If this attribute is <code>null</code>,
   3.137 +              this <a>index</a> is not <a>auto-populated</a>.
   3.138 +            </dd>
   3.139 +            
   3.140 +            <dt>readonly attribute boolean unique</dt>
   3.141 +            <dd>
   3.142 +              On getting, provide the <a>unique</a> flag of this <a>index</a>.
   3.143 +            </dd>
   3.144              <dt>void openObjectCursor()</dt>
   3.145              <dd>
   3.146                Create a <a>cursor</a> over the <a>records</a> of this 
   3.147 @@ -783,7 +856,38 @@
   3.148  cursor.continue();
   3.149  </codeblock>
   3.150            </div>
   3.151 -          <dl title="[NoInterfaceObject] interface IDBCursorSync : IDBCursor" class="idl">
   3.152 +          <dl title="[NoInterfaceObject] interface IDBCursorSync" class="idl">
   3.153 +            <dt>const     unsigned short     NEXT = 0</dt>
   3.154 +            <dd>
   3.155 +              indicates that this <a>cursor</a> should yield all records, including  
   3.156 +              duplicates and its <a>direction</a> is monotonically increasing 
   3.157 +              order of keys.
   3.158 +            </dd>
   3.159 +            <dt>const     unsigned short     NEXT_NO_DUPLICATE = 1</dt>
   3.160 +            <dd>
   3.161 +              indicates that this <a>cursor</a> should yield all records, not including
   3.162 +              duplicates and its <a>direction</a> is monotonically increasing 
   3.163 +              order of keys. For every key with duplicate values, only the first
   3.164 +              record is yielded.
   3.165 +            </dd>
   3.166 +            <dt>const     unsigned short     PREV = 2</dt>
   3.167 +            <dd>
   3.168 +              indicates that <a>cursor</a> should yield all records, including  
   3.169 +              duplicates and its <a>direction</a> is monotonically decreasing 
   3.170 +              order of keys.
   3.171 +            </dd>
   3.172 +            <dt>const     unsigned short     PREV_NO_DUPLICATE = 3</dt>
   3.173 +            <dd>
   3.174 +              indicates that this <a>cursor</a> should yield all records, not including
   3.175 +              duplicates and its <a>direction</a> is monotonically decreasing 
   3.176 +              order of keys. For every key with duplicate values, only the first
   3.177 +              record is yielded.
   3.178 +            </dd>
   3.179 +
   3.180 +            <dt>readonly attribute unsigned short     direction</dt>
   3.181 +            <dd>            
   3.182 +            On getting, provide the traversal <a>direction</a> of the <a>cursor</a>.
   3.183 +            </dd>
   3.184              <dt>readonly attribute any key</dt>
   3.185              <dd>The key for the record at the <a>cursor</a>'s <a>position</a>.</dd>
   3.186              <dt>attribute any value</dt>
   3.187 @@ -845,12 +949,19 @@
   3.188          </section>
   3.189          <section id="transaction-sync" class="section">
   3.190            <h4>Transaction</h4>
   3.191 +          <!-- TODO Add example. Should examples be in a separate section?-->
   3.192            <p>
   3.193              When an application <a title="create a transaction">creates</a> a 
   3.194              <a>transaction</a> synchronously, it blocks until the user agent is able
   3.195              to reserve the required <a>database</a> <a>objects</a>.
   3.196            </p>
   3.197 -          <dl class="idl" title="[NoInterfaceObject] interface IDBTransactionSync : IDBTransaction">
   3.198 +          <dl class="idl" title="[NoInterfaceObject] interface IDBTransactionSync">
   3.199 +            <dt>attribute boolean static</dt>
   3.200 +            <dd>If <code>true</code>, then this <a>transaction</a> is <a>static</a>
   3.201 +              and <code>false</code> otherwise.
   3.202 +            <dt>attribute IDBDatabaseSync db</dt>
   3.203 +            <dd>The <a>database</a> <a>connection</a> of which this <a>transaction</a>
   3.204 +              is a part</dd>
   3.205              <dt>IDBObjectStoreSync objectStore()</dt>
   3.206              <dd>
   3.207                Immediately returns the object store that has been already added 
   3.208 @@ -908,68 +1019,7 @@
   3.209              A new <a>transaction</a> can be created to perform operations atomically.
   3.210            </p>
   3.211          </section> <!-- IDBTransaction -->
   3.212 -        <section class="section">
   3.213 -          <h3>The <code>IDBDatabaseException</code> Interface</h3>
   3.214 -          <dl class="idl" title="exception IDBDatabaseException">
   3.215 -            <dt>const unsigned short UNKNOWN_ERR = 0</dt>
   3.216 -            <dd>The operation failed for reasons unrelated to the database
   3.217 -              itself and not covered by any other error code.</dd>
   3.218 -            <dt>const unsigned short NON_TRANSIENT_ERR = 1</dt>
   3.219 -            <dd>This error occurred because an operation was not allowed on 
   3.220 -            an object. A retry of the same operation would fail unless the
   3.221 -            cause of the error is corrected.</dd>
   3.222 -            <dt>const unsigned short NOT_FOUND_ERR = 2</dt>
   3.223 -            <dd>The operation failed because the requested database
   3.224 -            object could not be found. For example, an object store
   3.225 -            did not exist but was being opened.</dd>
   3.226 -            <dt>const unsigned short CONSTRAINT_ERR = 3</dt>
   3.227 -            <dd>A mutation operation in the transaction failed due to a
   3.228 -            because a constraint was not satisfied. For example, an
   3.229 -            object such as an object store or index already
   3.230 -            exists and a new one was being attempted to be created.</dd>
   3.231 -            <dt>const unsigned short DATA_ERR = 4</dt>
   3.232 -            <dd>Data provided to an operation does not meet requirements.</dd>
   3.233 -            <dt>const unsigned short NOT_ALLOWED_ERR = 5</dt>
   3.234 -            <dd>A mutation operation was attempted on a database that
   3.235 -            did not allow mutations.</dd>
   3.236 -            <dt>const unsigned short SERIAL_ERR = 11</dt>
   3.237 -            <dd>The operation failed because of the size of the data set 
   3.238 -            being returned or because there was a problem in serializing or 
   3.239 -            deserializing the object being processed.</dd>
   3.240 -            <dt>const unsigned short RECOVERABLE_ERR = 21</dt>
   3.241 -            <dd>The operation failed because the database was prevented
   3.242 -            from taking an action. The operation might be able to succeed
   3.243 -            if the application performs some recovery steps and retries
   3.244 -            the entire transaction. For example, there was not enough 
   3.245 -            remaining storage space, or the storage quota was reached
   3.246 -            and the user declined to give more space to the database.</dd>
   3.247 -            <!--const unsigned short QUOTA_ERR = 22;
   3.248 -                <dd>The statement failed because there was not enough remaining
   3.249 -     storage space, or the storage quota was reached and the user
   3.250 -     declined to give more space to the database.</dd>-->
   3.251 -            <dt>const unsigned short TRANSIENT_ERR = 31</dt>
   3.252 -            <dd>The operation failed because of some temporary problems.
   3.253 -            The failed operation might be able to succeed when the
   3.254 -            operation is retried without any intervention by 
   3.255 -            application-level functionality.</dd>
   3.256 -            <dt>const unsigned short TIMEOUT_ERR = 32</dt>
   3.257 -            <dd>A lock for the transaction could not be obtained in a
   3.258 -            reasonable time.</dd>
   3.259 -            <dt>const unsigned short DEADLOCK_ERR = 33</dt>
   3.260 -            <dd>The current transaction was automatically rolled back
   3.261 -            by the database because of deadlock or other transaction
   3.262 -            serialization failures.</dd>
   3.263 -            <dt>attribute unsigned short code</dt>
   3.264 -            <dd>
   3.265 -              Return the most appropriate error code.
   3.266 -            </dd>
   3.267 -            <dt>attribute DOMString message</dt>
   3.268 -            <dd>
   3.269 -              Return an error message describing the exception raised. 
   3.270 -              The message should be localized to the user's language.
   3.271 -            </dd>
   3.272 -          </dl>  
   3.273 -        </section>     
   3.274 +       </section>
   3.275        </section>
   3.276        <!-- end-content -->
   3.277       </section>
     4.1 --- a/Speclet_023_IDB_API_Asynchronous_APIs.html	Tue Jun 22 18:59:06 2010 +0800
     4.2 +++ b/Speclet_023_IDB_API_Asynchronous_APIs.html	Tue Jun 22 14:55:14 2010 +0100
     4.3 @@ -134,10 +134,9 @@
     4.4        <section class="section" id="async-api"> 
     4.5          <h3>Asynchronous APIs</h3>
     4.6          <p>
     4.7 -          The asynchronous API returns without blocking the calling thread.
     4.8 -          Asynchronous APIs are essentially the same as the synchronous ones 
     4.9 -          except that the result of an operation is not available when the 
    4.10 -          operation returns.
    4.11 +          The asynchronous API methods return without blocking the calling thread.
    4.12 +          All asynchronous operations return an <a><code>IDBRequest</code></a> instance,
    4.13 +          which can be used to access the results of the operation as they become available.
    4.14          </p>
    4.15          <section class="section" id="events">
    4.16            <h4>Event interfaces</h4>
    4.17 @@ -309,7 +308,7 @@
    4.18          </section>
    4.19          
    4.20          <section class="section" id="requests">
    4.21 -          <h4>Asynchronous Request API</h4>
    4.22 +          <h4>Opening a database</h4>
    4.23           <p>
    4.24              <a title="Window"><a class="externalDFN"><code>Window</code></a> and 
    4.25              <a title="Worker"><a class="externalDFN"><code>Worker</code></a> objects 
    4.26 @@ -320,7 +319,7 @@
    4.27            </p>
    4.28            
    4.29            <dl class="idl" title="[NoInterfaceObject] interface IDBEnvironment">
    4.30 -            <dt>readonly attribute IDBFactoryRequest indexedDB</dt>
    4.31 +            <dt>readonly attribute IDBFactory indexedDB</dt>
    4.32              <dd>This attribute provides applications a mechanism for accessing
    4.33                capabilities of indexed databases.</dd>
    4.34            </dl>
    4.35 @@ -331,7 +330,8 @@
    4.36              This design means that any number of requests can be active on any <a>database</a>
    4.37              or <a title="objects">object</a> handle at a time. 
    4.38            </p>
    4.39 -          <dl class="idl" title="[NoInterfaceObject] interface IDBFactoryRequest">
    4.40 +
    4.41 +          <dl class="idl" title="[NoInterfaceObject] interface IDBFactory">
    4.42              <dt>readonly attribute DOMStringList databases</dt>
    4.43              <dd>
    4.44              This value is the list of the names of databases available in the global scope object.
    4.45 @@ -368,8 +368,8 @@
    4.46                    code and abort these steps.
    4.47                  </li>
    4.48                  <li>
    4.49 -                  Create a <a><code>IDBDatabaseRequest</code></a> object for 
    4.50 -                  <var>result</var> and call it <var>db</var>.
    4.51 +                  Create a <a><code>IDBDatabase</code></a> object for <var>result</var>
    4.52 +                  and call it <var>db</var>.
    4.53                  </li>
    4.54                  <li>
    4.55                    Fire a <a title="event-success">success event</a> on this 
    4.56 @@ -389,7 +389,44 @@
    4.57                </dl>
    4.58              </dd>
    4.59            </dl>
    4.60 -          <dl class="idl" title="[NoInterfaceObject] interface IDBDatabaseRequest : IDBDatabase">
    4.61 +        </section>
    4.62 +        <section id="database-interface" class="section">
    4.63 +          <h4>Database</h4>
    4.64 +          <!-- TODO Add example. Should examples be in a separate section?-->
    4.65 +          <p>
    4.66 +            A <a>database</a> object can be used to manipulate the 
    4.67 +            <a>objects</a> of that <a>database</a>. That is also the only way to 
    4.68 +            obtaining a <a>transaction</a> for that <a>database</a>.
    4.69 +          </p>
    4.70 +          <dl class="idl" title="[NoInterfaceObject] interface IDBDatabase">
    4.71 +            <dt>readonly attribute DOMString name</dt>
    4.72 +            <dd>
    4.73 +              On getting, this attribute MUST return the <a title="database name">name</a>
    4.74 +              of the <a title="connection">connected</a> <a>database</a>.
    4.75 +            </dd>
    4.76 +            <dt>readonly attribute DOMString description</dt>  
    4.77 +            <dd>
    4.78 +              On getting, this attribute MUST return the description of the
    4.79 +              <a title="connection">connected</a> <a>database</a>.
    4.80 +            </dd>
    4.81 +            <dt>readonly attribute DOMString version</dt>
    4.82 +            <dd>
    4.83 +              On getting, this attribute MUST return the <a>version</a> of this
    4.84 +              <a>database</a>. This attribute has the <a>null</a> value when the
    4.85 +              <a title="connection">connected</a> <a>database</a> is first created.
    4.86 +            </dd>
    4.87 +            <dt>readonly attribute DOMStringList objectStores</dt>
    4.88 +            <dd>
    4.89 +              On getting, this attribute MUST return a list of names of the 
    4.90 +              <a title="object store">object stores</a> currently in the 
    4.91 +              <a title="connection">connected</a> <a>database</a>.
    4.92 +            </dd>
    4.93 +            <dt>readonly attribute IDBTransaction currentTransaction</dt>
    4.94 +            <dd>
    4.95 +              On getting, this attribute MUST return a <a><code>IDBTransaction</code></a> object
    4.96 +              corresponding to the <a>transaction</a> that is <a>active</a> in this
    4.97 +              <a>database</a> <a>connection</a>.
    4.98 +            </dd>
    4.99              <dt>IDBRequest createObjectStore()</dt>
   4.100              <dd>
   4.101                <p>
   4.102 @@ -413,7 +450,7 @@
   4.103                  <a title="event-success">success event</a> is fired on this 
   4.104                  method's returned object using the <a><code>IDBTransactionEvent</code></a> interfacewith its 
   4.105                  <a class="idlType" href="#widl-IDBSuccessEvent-result"><code>result</code></a> set
   4.106 -                to a new <a><code>IDBObjectStoreRequest</code></a> for that <a>object store</a> and <a class="idlType" href="#widl-IDBTransactionEvent-transaction"><code>transaction</code></a> set
   4.107 +                to a new <a><code>IDBObjectStore</code></a> for that <a>object store</a> and <a class="idlType" href="#widl-IDBTransactionEvent-transaction"><code>transaction</code></a> set
   4.108                  to the <a>transaction</a> passed to this method.
   4.109                </p>
   4.110                <dl class="parameters">
   4.111 @@ -442,7 +479,7 @@
   4.112                returned object using the <a><code>IDBTransactionEvent</code></a> 
   4.113                interface with its 
   4.114                <a class="idlType" href="#widl-IDBSuccessEvent-result"><code>result</code></a> set to a new 
   4.115 -              <a><code>IDBObjectStoreRequest</code></a> for that <a>object store</a> and  <a class="idlType" href="#widl-IDBTransactionEvent-transaction"><code>transaction</code></a> 
   4.116 +              <a><code>IDBObjectStore</code></a> for that <a>object store</a> and  <a class="idlType" href="#widl-IDBTransactionEvent-transaction"><code>transaction</code></a> 
   4.117                set to a new <code>IDBTransactionRequest</code> for the 
   4.118                implicit <a>transaction</a>.
   4.119                <dl class="parameters">
   4.120 @@ -480,7 +517,7 @@
   4.121                  returned object using the <a><code>IDBTransactionEvent</code></a> 
   4.122                  interface with its 
   4.123                  <a class="idlType" href="#widl-IDBSuccessEvent-result"><code>result</code></a> set to a new 
   4.124 -                <a><code>IDBObjectStoreRequest</code></a> for that <a>object store</a> and <a class="idlType" href="#widl-IDBTransactionEvent-transaction"><code>transaction</code></a> set
   4.125 +                <a><code>IDBObjectStore</code></a> for that <a>object store</a> and <a class="idlType" href="#widl-IDBTransactionEvent-transaction"><code>transaction</code></a> set
   4.126                  to the <a>transaction</a> passed to this method.
   4.127                </p>              
   4.128                <dl class="parameters">
   4.129 @@ -559,7 +596,7 @@
   4.130                fired on this method's returned object using the 
   4.131                <a><code>IDBTransactionEvent</code></a> interface with its 
   4.132                <a class="idlType" href="#widl-IDBSuccessEvent-result"><code>result</code></a> set to 
   4.133 -              a new <a><code>IDBTransactionRequest</code></a> object and 
   4.134 +              a new <a><code>IDBTransaction</code></a> object and 
   4.135                <a class="idlType" href="#widl-IDBTransactionEvent-transaction"><code>transaction</code></a> 
   4.136                set to the <a>transaction</a> passed to this method. If reserving all the 
   4.137                <a>object store</a>s identified in the requested <a>scope</a> 
   4.138 @@ -586,7 +623,41 @@
   4.139                </dl>
   4.140              </dd>
   4.141            </dl>
   4.142 -          <dl class="idl" title="[NoInterfaceObject] interface IDBObjectStoreRequest : IDBObjectStore">
   4.143 +        </section>
   4.144 +        <section class="section" id="object-store-sync">  
   4.145 +          <h4>Object Store</h4>
   4.146 +          <a title="object store">Object store</a> objects implement the following
   4.147 +          interface:
   4.148 +          <dl class="idl" title="[NoInterfaceObject] interface IDBObjectStore">
   4.149 +            <dt>const     unsigned short READ_WRITE    = 0</dt>
   4.150 +            <dd>Modification operations are allowed on the <a>object store</a>
   4.151 +            in this mode.</dd>
   4.152 +            <dt>const     unsigned short READ_ONLY    = 1</dt>
   4.153 +            <dd>Modification operations are not allowed on the <a>object store</a>
   4.154 +            in this mode.</dd>
   4.155 +            <dt>const     unsigned short SNAPSHOT_READ = 2</dt>
   4.156 +            <dd>This mode is used solely for reading from a snapshot of the data
   4.157 +            in the <a>object store</a>.</dd>
   4.158 +
   4.159 +            <dt>readonly attribute unsigned short mode</dt>
   4.160 +            <dd>On getting, provide the <a>mode</a> for isolating access to data inside
   4.161 +            this <a>object store</a></dd>
   4.162 +            <dt>readonly attribute DOMString      name</dt>
   4.163 +            <dd>          
   4.164 +              On getting, provide the <a title="object store name">name</a> of this
   4.165 +              object store.        
   4.166 +            </dd>
   4.167 +            <dt>readonly attribute DOMString      keyPath</dt>
   4.168 +            <dd>
   4.169 +              On getting, provide the <a title="object store key path">key path</a>
   4.170 +              of this <a>object store</a>. If this attribute is <code>null</code>,
   4.171 +              the application MUST provide a key value for each modification operation.
   4.172 +            </dd>
   4.173 +            <dt>readonly attribute DOMStringList  indexNames</dt>
   4.174 +            <dd>
   4.175 +            On getting, provide a list of the names of <a title="index">indexes</a> on 
   4.176 +            objects in this <a>object store</a>.
   4.177 +            </dd>
   4.178              <dt>IDBRequest put()</dt>
   4.179              <dd>
   4.180                This method returns immediately and stores the given value in this 
   4.181 @@ -734,7 +805,7 @@
   4.182                <a title="event-success">success event</a> is fired on this method's
   4.183                returned object with its 
   4.184                <a class="idlType" href="#widl-IDBSuccessEvent-result"><code>result</code></a> set to the
   4.185 -              <a><code>IDBCursorRequest</code></a> object for that <a>cursor</a>. If no
   4.186 +              <a><code>IDBCursor</code></a> object for that <a>cursor</a>. If no
   4.187                records match the <a>key range</a>, then an 
   4.188                <a title="event-error">error event</a> is fired on this method's
   4.189                returned object with its 
   4.190 @@ -776,7 +847,7 @@
   4.191                  <a title="event-success">success event</a> is fired on this method's
   4.192                  returned object with its 
   4.193                  <a class="idlType" href="#widl-IDBSuccessEvent-result"><code>result</code></a> set to a new
   4.194 -                <a><code>IDBIndexRequest</code></a> for that <a>index</a>.
   4.195 +                <a><code>IDBIndex</code></a> for that <a>index</a>.
   4.196                </p>
   4.197                <dl class="parameters">
   4.198                  <dt>DOMString      name</dt>
   4.199 @@ -792,7 +863,7 @@
   4.200                  <dd>The <a>unique</a> flag for the new <a>index</a></dd>
   4.201                </dl>
   4.202              </dd>
   4.203 -            <dt>IDBIndexRequest index()</dt>
   4.204 +            <dt>IDBIndex index()</dt>
   4.205              <dd>
   4.206                <p>
   4.207                  This method returns immediately and opens the <a>index</a> with the
   4.208 @@ -809,7 +880,7 @@
   4.209                  <a title="event-success">success event</a> is fired on this method's
   4.210                  returned object with its 
   4.211                  <a class="idlType" href="#widl-IDBSuccessEvent-result"><code>result</code></a> set to a new 
   4.212 -                <a><code>IDBIndexRequest</code></a> for that <a>index</a>.
   4.213 +                <a><code>IDBIndex</code></a> for that <a>index</a>.
   4.214                </p>              
   4.215                <dl class="parameters">
   4.216                  <dt>DOMString name</dt>
   4.217 @@ -836,8 +907,36 @@
   4.218                </dl>
   4.219              </dd>
   4.220            </dl>
   4.221 -          <dl class="idl" title="[NoInterfaceObject] interface IDBIndexRequest : IDBIndex">
   4.222 -            <dt>IDBCursorRequest openObjectCursor()</dt>
   4.223 +        </section>
   4.224 +        <section class="section" id="index">
   4.225 +        <h4>Index</h4>
   4.226 +          <!-- TODO Add example. Should examples be in a separate section?-->
   4.227 +          <p>
   4.228 +            <a title="index">Index</a> objects implement the followin interface:
   4.229 +          </p>
   4.230 +          <dl class="idl" title="[NoInterfaceObject] interface IDBIndex">
   4.231 +            <dt>readonly attribute DOMString      name</dt>
   4.232 +            <dd>
   4.233 +              On getting, provide the <a title="index name">name</a> of this <a>index</a>.        
   4.234 +            </dd>
   4.235 +            <dt>readonly attribute DOMString      storeName</dt>
   4.236 +            <dd>
   4.237 +              On getting, provide the <a title="object store name">name</a> of this
   4.238 +              <a title="index">index's</a> <a>referenced</a> <a>object store</a>.
   4.239 +            </dd>
   4.240 +        
   4.241 +            <dt>readonly attribute DOMString      keyPath</dt>
   4.242 +            <dd>
   4.243 +              On getting, provide the <a title="index key path">key path<a> of this
   4.244 +              <a>index</a>. If this attribute is <code>null</code>,
   4.245 +              this <a>index</a> is not <a>auto-populated</a>.
   4.246 +            </dd>
   4.247 +            
   4.248 +            <dt>readonly attribute boolean unique</dt>
   4.249 +            <dd>
   4.250 +              On getting, provide the <a>unique</a> flag of this <a>index</a>.
   4.251 +            </dd>
   4.252 +            <dt>IDBCursor openObjectCursor()</dt>
   4.253              <dd>
   4.254                This method returns immediately and creates a <a>cursor</a> over the 
   4.255                <a>records</a> of this <a>index</a>'s <a>referenced</a> <a>object store</a> 
   4.256 @@ -849,7 +948,7 @@
   4.257                <a title="event-success">success event</a> is fired on this method's
   4.258                returned object with its 
   4.259                <a class="idlType" href="#widl-IDBSuccessEvent-result"><code>result</code></a> set to the
   4.260 -              <a><code>IDBCursorRequest</code></a> object for that <a>cursor</a>. If no
   4.261 +              <a><code>IDBCursor</code></a> object for that <a>cursor</a>. If no
   4.262                records match the <a>key range</a>, then an
   4.263                <a title="event-error">error event</a> is fired on this method's
   4.264                returned object with its 
   4.265 @@ -875,7 +974,7 @@
   4.266                <a title="event-success">success event</a> is fired on this method's
   4.267                returned object with its 
   4.268                <a class="idlType" href="#widl-IDBSuccessEvent-result"><code>result</code></a> set to the 
   4.269 -              <a><code>IDBCursorRequest</code></a> object for that <a>cursor</a>. If no
   4.270 +              <a><code>IDBCursor</code></a> object for that <a>cursor</a>. If no
   4.271                records match the <a>key range</a>, then an
   4.272                <a title="event-error">error event</a> is fired on this method's
   4.273                returned object with its 
   4.274 @@ -987,7 +1086,45 @@
   4.275                </dl>
   4.276              </dd>
   4.277            </dl>
   4.278 -          <dl class="idl" title="[NoInterfaceObject] interface IDBCursorRequest : IDBCursor">
   4.279 +        </section>
   4.280 +        <section class="section" id="cursor">
   4.281 +          <h4>Cursor</h4>
   4.282 +          <!-- TODO Add example. Should examples be in a separate section?-->
   4.283 +          <p>
   4.284 +            <a title="cursor">Cursor</a> objects implement the following interface:
   4.285 +          </p>
   4.286 +          <dl class="idl" title="[NoInterfaceObject] interface IDBCursor">
   4.287 +  <dt>const     unsigned short     NEXT = 0</dt>
   4.288 +            <dd>
   4.289 +              indicates that this <a>cursor</a> should yield all records, including  
   4.290 +              duplicates and its <a>direction</a> is monotonically increasing 
   4.291 +              order of keys.
   4.292 +            </dd>
   4.293 +            <dt>const     unsigned short     NEXT_NO_DUPLICATE = 1</dt>
   4.294 +            <dd>
   4.295 +              indicates that this <a>cursor</a> should yield all records, not including
   4.296 +              duplicates and its <a>direction</a> is monotonically increasing 
   4.297 +              order of keys. For every key with duplicate values, only the first
   4.298 +              record is yielded.
   4.299 +            </dd>
   4.300 +            <dt>const     unsigned short     PREV = 2</dt>
   4.301 +            <dd>
   4.302 +              indicates that <a>cursor</a> should yield all records, including  
   4.303 +              duplicates and its <a>direction</a> is monotonically decreasing 
   4.304 +              order of keys.
   4.305 +            </dd>
   4.306 +            <dt>const     unsigned short     PREV_NO_DUPLICATE = 3</dt>
   4.307 +            <dd>
   4.308 +              indicates that this <a>cursor</a> should yield all records, not including
   4.309 +              duplicates and its <a>direction</a> is monotonically decreasing 
   4.310 +              order of keys. For every key with duplicate values, only the first
   4.311 +              record is yielded.
   4.312 +            </dd>
   4.313 +
   4.314 +            <dt>readonly attribute unsigned short     direction</dt>
   4.315 +            <dd>            
   4.316 +            On getting, provide the traversal <a>direction</a> of the <a>cursor</a>.
   4.317 +            </dd>
   4.318              <dt>readonly attribute any key</dt>
   4.319              <dd>The key for the record at the <a>cursor</a>'s <a>position</a>.</dd>
   4.320              <dt>readonly attribute any value</dt>
   4.321 @@ -1068,8 +1205,23 @@
   4.322                </p>
   4.323              </dd>
   4.324            </dl>
   4.325 -          <dl class="idl" title="[NoInterfaceObject] interface IDBTransactionRequest : IDBTransaction">
   4.326 -            <dt>IDBObjectStoreRequest objectStore()</dt>
   4.327 +        </section>
   4.328 +        <section class="section" id="transaction">
   4.329 +        <h4>Transaction</h4>
   4.330 +          <!-- TODO Add example. Should examples be in a separate section?-->
   4.331 +          <p>
   4.332 +            <a title="transaction">Transaction</a> objects implement the following interface:
   4.333 +          </p>
   4.334 +          <dl class="idl" title="[NoInterfaceObject] interface IDBTransaction : EventTarget">
   4.335 +            <dt>attribute boolean static</dt>
   4.336 +            <dd>If <code>true</code>, then this <a>transaction</a> is <a>static</a>
   4.337 +              and <code>false</code> otherwise.
   4.338 +            </dd>
   4.339 +            <dt>attribute IDBDatabase db</dt>
   4.340 +            <dd>The <a>database</a> <a>connection</a> of which this <a>transaction</a>
   4.341 +              is a part
   4.342 +            </dd>
   4.343 +            <dt>IDBObjectStore objectStore()</dt>
   4.344              <dd>
   4.345                Immediately returns the object store that has been already added 
   4.346                to the <a>scope</a> of this <a>transaction</a>. 
   4.347 @@ -1088,8 +1240,8 @@
   4.348              <dt>void abort()</dt>
   4.349              <dd>
   4.350                This method returns immediately and undoes all the changes performed to 
   4.351 -              the <a>objects</a> of this <a>database</a> in this <a>transaction</a>. If this <a>transaction</a> has already been committed
   4.352 -              or aborted,  then an
   4.353 +              the <a>objects</a> of this <a>database</a> in this <a>transaction</a>. If this <a>transaction</a> 
   4.354 +              has already been committed or aborted,  then an
   4.355                <a title="event-error">error event</a> is fired on this method's
   4.356                returned object with its 
   4.357                <a class="idlType" href="#widl-IDBErrorEvent-code"><code>code</code></a> set to
   4.358 @@ -1120,15 +1272,14 @@
   4.359                <a class="idlType" href="#widl-IDBErrorEvent-message"><code>message</code></a>.
   4.360              </dd>
   4.361              <dt>attribute Function onabort</dt>
   4.362 +            <dd>The event handler for the <a>onabort</a> event.</dd>
   4.363              <dt>attribute Function oncomplete</dt>
   4.364 +            <dd>The event handler for the <a>oncomplete</a> event.</dd>
   4.365              <dt>attribute Function ontimeout</dt>
   4.366 +            <dd>The event handler for the <a>ontimeout</a> event.</dd>
   4.367            </dl>
   4.368 -          <p class="idl" title="IDBTransactionRequest implements EventTarget">
   4.369          </section>
   4.370 -                  
   4.371 -      </section>            
   4.372 -    </section> <!-- API -->      
   4.373 -
   4.374 +      </section>
   4.375        <!-- end-content -->
   4.376      </section>
   4.377    </body>