More on async proposal
authorNikunj Mehta <nikunj@o-micron.com>
Tue, 22 Jun 2010 00:59:36 +0800
changeset 23837696f7a12e
parent 20 e57140c6bcc6
child 24 0fc5c337de3c
More on async proposal
Overview.html
Speclet_020_IDB_API_Constructs.html
Speclet_021_IDB_API_Algorithms.html
Speclet_022_IDB_API_Synchronous_APIs.html
Speclet_023_IDB_API_Asynchronous_APIs.html
build.pl
template.html
     1.1 --- a/Overview.html	Thu Jun 17 12:31:27 2010 -0700
     1.2 +++ b/Overview.html	Tue Jun 22 00:59:36 2010 +0800
     1.3 @@ -382,31 +382,37 @@
     1.4          <section class="section" id="object-store-concept">  
     1.5            <h4>Object Store</h4>
     1.6            <p>
     1.7 -            An <dfn>object store</dfn> is a persistent storage mechanism that holds 
     1.8 -            key-value pairs, also called <dfn title="record">records</dfn>. An 
     1.9 -            <a>object store</a>'s <a title="record">records</a> are sorted by
    1.10 -            keys to enable fast insertion and look up as well as ordered retrieval. 
    1.11 -            Every <a>object store</a> has a <dfn title="object store name">name</dfn>.
    1.12 +            An <dfn>object store</dfn> is a persistent storage mechanism that 
    1.13 +            holds key-value pairs, also called <dfn title="record">records</dfn> 
    1.14 +            or <dfn>stored objects</dfn>. An <a>object store</a>'s 
    1.15 +            <a title="record">records</a> are sorted by keys to enable fast 
    1.16 +            insertion and look up as well as ordered retrieval. 
    1.17            </p>
    1.18 -          
    1.19 +          <p>
    1.20 +            Every <a>object store</a> has a 
    1.21 +            <dfn title="object store name">name</dfn>. Within a <a>database</a>, 
    1.22 +            each <a>object store</a> MUST have a <a title="valid-name">valid</a> 
    1.23 +            and unique <a title="object store name">name</a>. 
    1.24 +          </p>          
    1.25            <p>
    1.26              If an <a>object store</a> uses keys generated from a monotonically
    1.27 -            increasing sequence, it MUST have a <dfn>key generator</dfn> that produces
    1.28 -            unique keys for records in that <a>object store</a>. 
    1.29 -            Alternatively, if an application provides keys,
    1.30 -            they MAY either be identified as a part of the value being stored,
    1.31 -            also called <dfn>in-line keys</dfn>, or be identified separately, also
    1.32 -            called <dfn>out-of-line keys</dfn>. No two <a title="record">records</a>
    1.33 -            in an <a>object store</a> MAY be identified by the same key. An
    1.34 -            <a>object store</a> MUST have a <dfn title="object store key path">key path</dfn> 
    1.35 -            if it uses <a>in-line keys</a>. The <a>key path</a> MUST be the name of
    1.36 -            an enumerated property of all objects being stored in that 
    1.37 +            increasing sequence, it MUST have a <dfn>key generator</dfn> that 
    1.38 +            produces unique keys for records in that <a>object store</a>. 
    1.39 +            Alternatively, if an application provides keys, they MAY either be 
    1.40 +            identified as a part of the value being stored, also called 
    1.41 +            <dfn>in-line keys</dfn>, or be identified separately, also
    1.42 +            called <dfn>out-of-line keys</dfn>. No two 
    1.43 +            <a title="record">records</a> in an <a>object store</a> MAY be 
    1.44 +            identified by the same key. An <a>object store</a> MUST have a 
    1.45 +            <dfn title="object store key path">key path</dfn> if it uses 
    1.46 +            <a>in-line keys</a>. The <a>key path</a> MUST be the name 
    1.47 +            of an enumerated property of all stored objects in that 
    1.48              <a>object store</a>.
    1.49            </p>
    1.50            
    1.51            <p>
    1.52 -            Concurrent access to an <a>object store</a> MAY be isolated in one of 
    1.53 -            three <dfn title="mode">modes</dfn>. These are:
    1.54 +            Concurrent access to an <a>object store</a> MAY be isolated in one 
    1.55 +            of three <dfn title="mode">modes</dfn>. These are:
    1.56              <ol>
    1.57                <li><code>READ_ONLY</code></li>
    1.58                <li><code>READ_WRITE</code></li>
    1.59 @@ -414,48 +420,49 @@
    1.60              </ol>
    1.61            </p>
    1.62            <p>  
    1.63 -            Any number of <a title="reader">readers</a>
    1.64 -            MAY concurrently access an <a>object store</a>. A <a>writer</a> is not allowed
    1.65 -            if there is any <a>reader</a> concurrently accessing the <a>object store</a>,
    1.66 -            unless the <a>reader</a> is detached, i.e., looking at a snapshot view
    1.67 -            of the data that does not change once created. 
    1.68 +            Any number of <a title="reader">readers</a> MAY concurrently access 
    1.69 +            an <a>object store</a>. A <a>writer</a> is not allowed
    1.70 +            if there is any <a>reader</a> concurrently accessing the 
    1.71 +            <a>object store</a>, unless the <a>reader</a> is detached, i.e., 
    1.72 +            looking at a snapshot view of the data that does not change once 
    1.73 +            created. 
    1.74            </p>
    1.75            <!--div class="ednote">
    1.76              The detached reading behavior MAY need more explanation.
    1.77            </div-->
    1.78            <p>
    1.79 -            The <a><code>IDBObjectStore</code></a> interface provides access to the metadata
    1.80 -            of an <a>object store</a>.
    1.81 +            The <a><code>IDBObjectStore</code></a> interface provides access to 
    1.82 +            the metadata of an <a>object store</a>.
    1.83            </p>
    1.84            <dl title="interface IDBObjectStore" class="idl">
    1.85              <dt>const     unsigned short READ_WRITE    = 0</dt>
    1.86              <dd>Modification operations are allowed on the <a>object store</a>
    1.87              in this mode.</dd>
    1.88              <dt>const     unsigned short READ_ONLY    = 1</dt>
    1.89 -            <dd>Modification operations are not allowed on the <a>object store</a>
    1.90 -            in this mode.</dd>
    1.91 +            <dd>Modification operations are not allowed on the <a>object 
    1.92 +            store</a> in this mode.</dd>
    1.93              <dt>const     unsigned short SNAPSHOT_READ = 2</dt>
    1.94              <dd>This mode is used solely for reading from a snapshot of the data
    1.95              in the <a>object store</a>.</dd>
    1.96 -
    1.97              <dt>readonly attribute unsigned short mode</dt>
    1.98 -            <dd>On getting, provide the <a>mode</a> for isolating access to data inside
    1.99 -            this <a>object store</a></dd>
   1.100 +            <dd>On getting, provide the <a>mode</a> for isolating access to data 
   1.101 +            inside this <a>object store</a></dd>
   1.102              <dt>readonly attribute DOMString      name</dt>
   1.103              <dd>          
   1.104 -              On getting, provide the <a title="object store name">name</a> of this
   1.105 -              object store.        
   1.106 +              On getting, provide the <a title="object store name">name</a> of 
   1.107 +              this object store.        
   1.108              </dd>
   1.109              <dt>readonly attribute DOMString      keyPath</dt>
   1.110              <dd>
   1.111 -              On getting, provide the <a title="object store key path">key path</a>
   1.112 -              of this <a>object store</a>. If this attribute is <code>null</code>,
   1.113 +              On getting, provide the 
   1.114 +              <a title="object store key path">key path</a> of this 
   1.115 +              <a>object store</a>. If this attribute is <code>null</code>,
   1.116                the application MUST provide a key value for each modification operation.
   1.117              </dd>
   1.118              <dt>readonly attribute DOMStringList  indexNames</dt>
   1.119              <dd>
   1.120 -            On getting, provide a list of the names of <a title="index">indexes</a> on 
   1.121 -            objects in this <a>object store</a>.
   1.122 +            On getting, provide a list of the names of 
   1.123 +            <a title="index">indexes</a> on objects in this <a>object store</a>.
   1.124              </dd>
   1.125            </dl>
   1.126          </section> <!-- Object store -->
   1.127 @@ -463,33 +470,39 @@
   1.128          <section id="index-concept" class="section">
   1.129            <h4>Index</h4>
   1.130            <p>
   1.131 -            <a title="record">Records</a> in an <a>object store</a> can be retrieved using 
   1.132 -            the <a title="record">record's</a> key. However, that MAY not 
   1.133 -            always be adequate to recall <a title="record">records</a>. An <a>index</a> is
   1.134 -            used to lookup records in an <a>object store</a> other than through a
   1.135 +            <a title="record">Records</a> in an <a>object store</a> can be 
   1.136 +            retrieved using the <a title="record">record's</a> key. However, 
   1.137 +            that MAY not always be adequate to recall 
   1.138 +            <a title="record">records</a>. An <a>index</a> is used to lookup 
   1.139 +            records in an <a>object store</a> other than through a
   1.140              <a>record</a> key.
   1.141            </p>
   1.142            <p>
   1.143 -            An <dfn>index</dfn> is a specialized persistent store that holds key-value 
   1.144 -            pairs such that each value is the key of objects in the <dfn>referenced</dfn>
   1.145 -            <a>object store</a>. If an <a>index</a>'s <dfn>unique</dfn> flag is set, then
   1.146 -            it MUST NOT allow duplicate values for a key.
   1.147 -            Every <a>index</a> has a <dfn title="index name">name</dfn>.
   1.148 +            An <dfn>index</dfn> is a specialized persistent store that holds 
   1.149 +            key-value pairs such that each value is the key of objects in the 
   1.150 +            <dfn>referenced</dfn> <a>object store</a>. If an <a>index</a>'s 
   1.151 +            <dfn>unique</dfn> flag is set, then it MUST NOT allow duplicate 
   1.152 +            values for a key. Every <a>index</a> has a 
   1.153 +            <dfn title="index name">name</dfn>. Within an 
   1.154 +            <a>object store</a>, each <a>index</a> MUST have a
   1.155 +            <a title="valid-name">valid</a> and unique 
   1.156 +            <a title="index name">name</a>.
   1.157            </p>
   1.158            <p>
   1.159 -            If an <a>index</a> is <dfn>auto-populated</dfn>, then the user agent populates
   1.160 -            records using the values stored in the <a>referenced</a> <a>object store</a>.
   1.161 -            An <a>auto-populated</a> <a>index</a> MUST have a 
   1.162 -            <dfn title="index key path">key path</dfn>. This <a>key path</a> MUST be the
   1.163 -            name of an enumerated property of every object to be stored in the  
   1.164 -            <a>object store</a> <a>referenced</a> by that <a>index</a>. The 
   1.165 -            <a>auto-populated</a> <a>index</a> record 
   1.166 -            corresponding to an <a>object store</a> record MUST satisfy the following 
   1.167 -            <dfn>index maintenance conditions</dfn>:
   1.168 +            If an <a>index</a> is <dfn>auto-populated</dfn>, then the user agent 
   1.169 +            populates records using the values stored in the <a>referenced</a> 
   1.170 +            <a>object store</a>. An <a>auto-populated</a> <a>index</a> MUST have 
   1.171 +            a <dfn title="index key path">key path</dfn>. This <a>key path</a> 
   1.172 +            MUST be the name of an enumerated property of every object to be 
   1.173 +            stored in the <a>object store</a> <a>referenced</a> by that 
   1.174 +            <a>index</a>. The <a>auto-populated</a> <a>index</a> record 
   1.175 +            corresponding to an <a>object store</a> record MUST satisfy the 
   1.176 +            following <dfn>index maintenance conditions</dfn>:
   1.177            </p>
   1.178            <ul>
   1.179 -            <li><a>index</a> record key = value of the enumerated property at the 
   1.180 -            <a title="index key path">key path<a> in the <a>object store</a> record value</li>
   1.181 +            <li><a>index</a> record key = value of the enumerated property at 
   1.182 +            the <a title="index key path">key path<a> in the <a>object store</a> 
   1.183 +            record value</li>
   1.184              <li><a>index</a> record value = <a>object store</a> record key</li>
   1.185            </ul>
   1.186            <p>
   1.187 @@ -499,18 +512,20 @@
   1.188            <dl class="idl" title="interface IDBIndex">
   1.189              <dt>readonly attribute DOMString      name</dt>
   1.190              <dd>
   1.191 -              On getting, provide the <a title="index name">name</a> of this <a>index</a>.        
   1.192 +              On getting, provide the <a title="index name">name</a> of this 
   1.193 +              <a>index</a>.        
   1.194              </dd>
   1.195              <dt>readonly attribute DOMString      storeName</dt>
   1.196              <dd>
   1.197 -              On getting, provide the <a title="object store name">name</a> of this
   1.198 -              <a title="index">index's</a> <a>referenced</a> <a>object store</a>.
   1.199 +              On getting, provide the <a title="object store name">name</a> of 
   1.200 +              this <a title="index">index's</a> <a>referenced</a> 
   1.201 +              <a>object store</a>.
   1.202              </dd>
   1.203          
   1.204              <dt>readonly attribute DOMString      keyPath</dt>
   1.205              <dd>
   1.206 -              On getting, provide the <a title="index key path">key path<a> of this
   1.207 -              <a>index</a>. If this attribute is <code>null</code>,
   1.208 +              On getting, provide the <a title="index key path">key path<a> of 
   1.209 +              this <a>index</a>. If this attribute is <code>null</code>,
   1.210                this <a>index</a> is not <a>auto-populated</a>.
   1.211              </dd>
   1.212              
   1.213 @@ -524,66 +539,50 @@
   1.214         <section id="database-concept" class="section">
   1.215            <h4>Database</h4>
   1.216            <p>
   1.217 -            Each <a>origin</a> has an associated set of <a title="database">databases</a>. 
   1.218 -            A <dfn>database</dfn> comprises:
   1.219 -          </p>
   1.220 -          <ul>
   1.221 -            <li>
   1.222 -              one or more <a title="object store">object stores</a> and
   1.223 -            </li>
   1.224 -            <li>
   1.225 -              any number of <a title="index">indexes</a>.
   1.226 -            </li>
   1.227 -          </ul>
   1.228 -          <p>
   1.229 -            The <a title="object store">object stores</a> and 
   1.230 -            <a title="index">indexes</a> of a <a>database</a> are also referred as
   1.231 -            its <dfn>objects</dfn>.
   1.232 -          </p>
   1.233 +            Each <a>origin</a> has an associated set of 
   1.234 +            <a title="database">databases</a>. A <dfn>database</dfn> comprises
   1.235 +            one or more <a title="object store">object stores</a>.
   1.236            <p>
   1.237              Each <a>database</a> has a <a title="valid-name">valid</a> 
   1.238 -            <dfn title="database name">name</dfn> and a human readable description.
   1.239 -            A <dfn title="valid-name">valid name</dfn> is any string including
   1.240 -            the empty string. An exact match of names means that their 
   1.241 -            UTF-8 encodings are identical.
   1.242 +            <dfn title="database name">name</dfn> and a human readable 
   1.243 +            description. A <dfn title="valid-name">valid name</dfn> is any 
   1.244 +            string including the empty string. An exact match of names means 
   1.245 +            that their UTF-8 encodings are identical.
   1.246            </p>
   1.247            
   1.248            <div class="note">
   1.249 -            If an implementation does not support all sets of strings, it may implement
   1.250 -            support for arbitrary strings by mapping
   1.251 +            If an implementation does not support all sets of strings, it may 
   1.252 +            implement support for arbitrary strings by mapping
   1.253              database names (e.g. using a hashing algorithm) to the supported
   1.254              set of names.
   1.255            </div>
   1.256            <p>
   1.257 -          Each <a>database</a> also has a current <dfn>version</dfn>.
   1.258 +            Each <a>database</a> also has a current <dfn>version</dfn>.
   1.259            </p>
   1.260            <div class="note">
   1.261 -            Each <a>database</a> has one version at a time; a <a>database</a> can't
   1.262 -            exist in multiple versions at once. 
   1.263 +            Each <a>database</a> has one version at a time; a <a>database</a> 
   1.264 +            can't exist in multiple versions at once. 
   1.265            </div>
   1.266            <p>
   1.267 -            The <a>object store</a> <a title="object store name">name</a> and <a>index</a> 
   1.268 -            <a title="index name">name</a> MUST be <a title="valid-name">valid</a> and 
   1.269 -            unique within the <a>database</a>.
   1.270 +            The act of opening a <a>database</a> creates a database 
   1.271 +            <dfn>connection</dfn>. There MAY be multiple 
   1.272 +            <a title="connection">connections</a> to a given <a>database</a> 
   1.273 +            at any given time. A <a>connection</a> that is attempting to read a 
   1.274 +            given piece of data in a <a>database</a> is called a 
   1.275 +            <dfn>reader</dfn> and one that is attempting to write a piece of 
   1.276 +            data is called a <dfn>writer</dfn>. A <a>connection</a> MAY have 
   1.277 +            zero or one <dfn>active</dfn> <a>transaction</a>s.
   1.278            </p>
   1.279            <p>
   1.280 -            The act of opening a <a>database</a> is creates a <dfn>connection</dfn>. There
   1.281 -            MAY be multiple <a title="connection">connections</a> to a given <a>database</a> 
   1.282 -            at any given time. A <a>connection</a> that is attempting to read a given piece
   1.283 -            of data in a <a>database</a> is called a <dfn>reader</dfn> and one that is
   1.284 -            attempting to write a piece of data is called a <dfn>writer</dfn>. A
   1.285 -            <a>connection</a> MAY have zero or one <dfn>active</dfn> <a>transaction</a>s.
   1.286 -          </p>
   1.287 -          <p>
   1.288 -            An <a><code>IDBDatabase</code></a> object represents a <a>connection</a> to a 
   1.289 -            <a>database</a>. This API does not provide a way to enumerate the 
   1.290 -            <a title="database">databases</a> available for an <a>origin</a> from this API. 
   1.291 +            An <a><code>IDBDatabase</code></a> object represents a 
   1.292 +            <a>connection</a> to a <a>database</a>. 
   1.293            </p>
   1.294            
   1.295            <dl title="[NoInterfaceObject] interface IDBDatabase" class="idl">   
   1.296              <dt>readonly attribute DOMString name</dt>
   1.297              <dd>
   1.298 -              On getting, this attribute MUST return the <a title="database name">name</a>
   1.299 +              On getting, this attribute MUST return the 
   1.300 +              <a title="database name">name</a>
   1.301                of the <a title="connection">connected</a> <a>database</a>.
   1.302              </dd>
   1.303              <dt>readonly attribute DOMString description</dt>  
   1.304 @@ -595,7 +594,8 @@
   1.305              <dd>
   1.306                On getting, this attribute MUST return the <a>version</a> of this
   1.307                <a>database</a>. This attribute has the <a>null</a> value when the
   1.308 -              <a title="connection">connected</a> <a>database</a> is first created.
   1.309 +              <a title="connection">connected</a> <a>database</a> is first 
   1.310 +              created.
   1.311              </dd>
   1.312              <dt>readonly attribute DOMStringList objectStores</dt>
   1.313              <dd>
   1.314 @@ -603,11 +603,11 @@
   1.315                <a title="object store">object stores</a> currently in the 
   1.316                <a title="connection">connected</a> <a>database</a>.
   1.317              </dd>
   1.318 -            <dt>readonly attribute IDBTransaction currentTransaction</dt>
   1.319 +            <dt>readonly attribute IDBTransactionList transactions</dt>
   1.320              <dd>
   1.321 -              On getting, this attribute MUST return a <a><code>IDBTransaction</code></a> object
   1.322 -              corresponding to the <a>transaction</a> that is <a>active</a> in this
   1.323 -              <a>database</a> <a>connection</a>.
   1.324 +              On getting, this attribute MUST return a sequence of
   1.325 +              <a><code>IDBTransaction</code></a> objects
   1.326 +              corresponding to the <a>transactions</a> that are <a>active</a> in this <a>database</a> <a>connection</a>.
   1.327              </dd>
   1.328            </dl>
   1.329          </section>  <!-- IDBDatabase -->
   1.330 @@ -615,23 +615,26 @@
   1.331          <section class="section" id="range-concept">
   1.332            <h4>Key Range</h4>
   1.333            <p>
   1.334 -            An individual record can be retrieved from an <a>object store</a> using 
   1.335 -            either the record's key or the key applicable for some <a>index</a> that
   1.336 -            <a title="referenced">references</a> that <a>object store</a>. Multiple
   1.337 -            records can be fetched using a <a>key range</a>. A <dfn>key range</dfn> 
   1.338 -            is a continuous interval over some data type used for keys.
   1.339 +            An individual record can be retrieved from an <a>object store</a> 
   1.340 +            using either the record's key or the key applicable for some 
   1.341 +            <a>index</a> that <a title="referenced">references</a> that 
   1.342 +            <a>object store</a>. Multiple records can be fetched using a <a>key 
   1.343 +            range</a>. A <dfn>key range</dfn> is a continuous interval over some 
   1.344 +            data type used for keys.
   1.345            </p>
   1.346            <p>
   1.347 -            A <a>key range</a> MAY be left-bounded or right-bounded if there is a value
   1.348 -            that is, respectively, smaller than or larger than all its elements. A
   1.349 -            <a>key range</a> is said to be bounded if it is both left- and right-bounded
   1.350 -            and unbounded otherwise. A <dfn title="valid key range">valid</dfn>
   1.351 -            <a>key range</a> MUST be either half-bounded or bounded. A <a>key range</a>
   1.352 -            MAY be open, i.e., not including its endpoints or closed, i.e., including
   1.353 +            A <a>key range</a> MAY be left-bounded or right-bounded if there is 
   1.354 +            a value that is, respectively, smaller than or larger than all its 
   1.355 +            elements. A <a>key range</a> is said to be bounded if it is both 
   1.356 +            left- and right-bounded and unbounded otherwise. A 
   1.357 +            <dfn title="valid key range">valid</dfn> <a>key range</a> MUST be 
   1.358 +            either half-bounded or bounded. A <a>key range</a> MAY be open, 
   1.359 +            i.e., not including its endpoints or closed, i.e., including
   1.360              its endpoints. A <a>key range</a> MAY consist of a single value.
   1.361            </p>
   1.362            <p>
   1.363 -            The <a><code>IDBKeyRange</code></a> interface defines a <a>key range</a>.
   1.364 +            The <a><code>IDBKeyRange</code></a> interface defines a 
   1.365 +            <a>key range</a>.
   1.366            </p>
   1.367            <dl class="idl" title="[NoInterfaceObject] interface IDBKeyRange"> 
   1.368              <dt>const     unsigned short SINGLE = 0</dt>
   1.369 @@ -700,30 +703,31 @@
   1.370            <p>
   1.371              <a title="cursor">Cursors</a> are a transient mechanism used to 
   1.372              iterate over multiple records in a database. The storage operations
   1.373 -            are performed on the underlying <a>index</a> or an <a>object store</a>.
   1.374 +            are performed on the underlying <a>index</a> or an 
   1.375 +            <a>object store</a>.
   1.376            </p>
   1.377            
   1.378            <p>
   1.379 -            A <dfn>cursor</dfn> comprises a <dfn>range</dfn> of records in either an
   1.380 -            <a>index</a> or an <a>object store</a>. A <a title="cursor">cursor</a>
   1.381 -            maintains a <dfn>position</dfn> over this series, which moves in a
   1.382 -            <dfn>direction</dfn> that is either monotonically increasing or 
   1.383 -            decreasing order of the record keys. 
   1.384 +            A <dfn>cursor</dfn> comprises a <dfn>range</dfn> of records in 
   1.385 +            either an <a>index</a> or an <a>object store</a>. A 
   1.386 +            <a title="cursor">cursor</a> maintains a <dfn>position</dfn> over 
   1.387 +            this series, which moves in a <dfn>direction</dfn> that is either 
   1.388 +            monotonically increasing or decreasing order of the record keys. 
   1.389            </p>
   1.390            
   1.391            <dl title="[NoInterfaceObject] interface IDBCursor" class="idl">
   1.392              <dt>const     unsigned short     NEXT = 0</dt>
   1.393              <dd>
   1.394 -              indicates that this <a>cursor</a> should yield all records, including  
   1.395 -              duplicates and its <a>direction</a> is monotonically increasing 
   1.396 -              order of keys.
   1.397 +              indicates that this <a>cursor</a> should yield all records, 
   1.398 +              including duplicates and its <a>direction</a> is monotonically 
   1.399 +              increasing order of keys.
   1.400              </dd>
   1.401              <dt>const     unsigned short     NEXT_NO_DUPLICATE = 1</dt>
   1.402              <dd>
   1.403 -              indicates that this <a>cursor</a> should yield all records, not including
   1.404 -              duplicates and its <a>direction</a> is monotonically increasing 
   1.405 -              order of keys. For every key with duplicate values, only the first
   1.406 -              record is yielded.
   1.407 +              indicates that this <a>cursor</a> should yield all records, not 
   1.408 +              including duplicates and its <a>direction</a> is monotonically 
   1.409 +              increasing order of keys. For every key with duplicate values, 
   1.410 +              only the first record is yielded.
   1.411              </dd>
   1.412              <dt>const     unsigned short     PREV = 2</dt>
   1.413              <dd>
   1.414 @@ -733,10 +737,10 @@
   1.415              </dd>
   1.416              <dt>const     unsigned short     PREV_NO_DUPLICATE = 3</dt>
   1.417              <dd>
   1.418 -              indicates that this <a>cursor</a> should yield all records, not including
   1.419 -              duplicates and its <a>direction</a> is monotonically decreasing 
   1.420 -              order of keys. For every key with duplicate values, only the first
   1.421 -              record is yielded.
   1.422 +              indicates that this <a>cursor</a> should yield all records, not 
   1.423 +              including duplicates and its <a>direction</a> is monotonically 
   1.424 +              decreasing order of keys. For every key with duplicate values, 
   1.425 +              only the first record is yielded.
   1.426              </dd>
   1.427  
   1.428              <dt>readonly attribute unsigned short     direction</dt>
   1.429 @@ -749,392 +753,1028 @@
   1.430          <section id="transaction-concept" class="section">
   1.431            <h4>Transaction</h4>
   1.432            <p>
   1.433 -            A <dfn>transaction</dfn> has a <dfn>scope</dfn> and a <a>database</a>.
   1.434 -            A <a>transaction</a>'s <a>scope</a> is either <dfn>static</dfn>
   1.435 -            or <dfn>dynamic</dfn>. If the scope is <a>static</a>, it can cover 
   1.436 -            either all the <a>object store</a>s and <a>index</a>es in a 
   1.437 -            <a>database</a> or it MAY include a subset of them.
   1.438 -          </p>
   1.439 -          <p>
   1.440 -            A <a>connection</a> MAY have at most one <a>transaction</a> at any
   1.441 -            given time. Moreover, there MAY not be any overlap among the
   1.442 -            <a>scope</a>s of all open <a title="connection">connections</a>
   1.443 -            to a given <a>database</a>.
   1.444 +            A <dfn>transaction</dfn> is defined on a <a>database</a>. A 
   1.445 +            <a>transaction</a>'s <a>scope</a> is either 
   1.446 +            <dfn>static</dfn> or <dfn>dynamic</dfn> and it MAY include a subset of the <a>object store</a>s of the <a>transaction</a>'s 
   1.447 +            <a>database</a>. If the <a>scope</a> is <a>static</a>, then it MAY 
   1.448 +            be <dfn>global</dfn>, meaning that it includes every existing and 
   1.449 +            to be created <a>object store</a>s of the <a>database</a>. There MAY 
   1.450 +            not be any overlap among the <a>scope</a>s of all open 
   1.451 +            <a title="connection">connections</a> to a given <a>database</a>.
   1.452            </p>
   1.453            <p>
   1.454              <a title="transaction">Transactions</a> offer some protection from 
   1.455              application and system failures. A <a>transaction</a> MAY be used to
   1.456              store multiple data records or to conditionally modify certain data 
   1.457 -            records. A <a>transaction</a> represents an atomic and durable set of 
   1.458 -            data access and mutation operations. 
   1.459 +            records. A <a>transaction</a> represents an atomic and durable set 
   1.460 +            of data access and mutation operations. 
   1.461            </p>
   1.462 -          
   1.463            <p>  
   1.464              <a title="transaction">Transactions</a> are expected to be short
   1.465 -            lived. Conforming user agents MAY terminate 
   1.466 -            <a title="transaction">transactions</a> that take too long to
   1.467 -            complete in order to free up storage resources that are locked by
   1.468 -            a long running <a>transaction</a>.
   1.469 +            lived. A <a>transaction</a> may be programmatically committed or 
   1.470 +            aborted. Unless a <a>transaction</a> is programmatically committed 
   1.471 +            or aborted, conforming user agents MUST automatically:
   1.472            </p>
   1.473 +          <ul>
   1.474 +            <li>
   1.475 +            commit a <a>transaction</a> at the end of the scope in
   1.476 +            which it was created unless there is an active operation being 
   1.477 +            performed using that transaction, in which case, the transaction is 
   1.478 +            automatically committed when that operation is completed. 
   1.479 +            </li>
   1.480 +            <li>
   1.481 +            abort a <a>transaction</a> at the end of the scope in which it was 
   1.482 +            created, if an exception is propagated to that scope.
   1.483 +            </li>
   1.484 +          </ul>
   1.485            <dl class="idl" title="interface IDBTransaction">
   1.486 -          	<dt>attribute boolean static</dt>
   1.487 -          	<dd>If <code>true</code>, then this <a>transaction</a> is <a>static</a>
   1.488 -          	and <code>false</code> otherwise.
   1.489 -          	<dt>attribute IDBDatabase db</dt>
   1.490 -          	<dd>The <a>database</a> <a>connection</a> of which this <a>transaction</a>
   1.491 -          	is a part</dd>
   1.492 +            <dt>attribute boolean static</dt>
   1.493 +            <dd>If <code>true</code>, then this <a>transaction</a> is 
   1.494 +            <a>static</a> and <code>false</code> otherwise.
   1.495 +            <dt>attribute IDBDatabase db</dt>
   1.496 +            <dd>The <a>database</a> <a>connection</a> of which this 
   1.497 +            <a>transaction</a> is a part</dd>
   1.498 +            <dt>attribute DOMStringList scope</dt>
   1.499 +            <dd>The names of <a>object store</a>s that are included in the scope 
   1.500 +            of this <a>transaction</a></dd>
   1.501            </dl>
   1.502          </section> <!-- IDBTransaction -->
   1.503        </section>  
   1.504 -      <section class="section" id="algorithms">
   1.505 -        <h3>Algorithms</h3>
   1.506 -        <section class="section" id="opening">
   1.507 -          <h4>Opening the database</h4>
   1.508 +      <section class="section" id="async-api"> 
   1.509 +        <h3>Asynchronous APIs</h3>
   1.510 +        <p>
   1.511 +          The asynchronous API returns without blocking the calling thread.
   1.512 +          Asynchronous APIs are essentially the same as the synchronous ones 
   1.513 +          except that the result of an operation is not available when the 
   1.514 +          operation returns.
   1.515 +        </p>
   1.516 +        <section class="section" id="events">
   1.517 +          <h4>Event interfaces</h4>
   1.518            <p>
   1.519 -            The <dfn>steps for opening a database</dfn> are as follows. These steps
   1.520 -            MUST be run with an origin, a database name and description. All the 
   1.521 -            steps MUST be run atomically:
   1.522 +            Events are fired during asynchronous access as <a>database</a> 
   1.523 +            <a>objects</a> are created and data is consumed from these objects. 
   1.524 +            As requests are made to <a>database</a> <a>objects</a>, the user 
   1.525 +            agent loads information about them into memory and when the required
   1.526 +            object handle is available, it alerts the application through the
   1.527 +            firing of events. The events are as follows:
   1.528 +          </p>
   1.529 +          <dl class="idl" title="[NoInterfaceObject] interface IDBEvent"> 
   1.530 +            <dt>readonly attribute any source</dt>
   1.531 +            <dd>Returns the asynchronous request object that fired this event.</dd>
   1.532 +          </dl>
   1.533 +          <dl class="idl" title="[NoInterfaceObject] interface IDBSuccessEvent : IDBEvent"> 
   1.534 +            <dt>readonly attribute any result</dt>
   1.535 +            <dd>Returns the result of the successful completion of an asynchronous request
   1.536 +            on the <a class="idlType" href="#widl-IDBEvent-source"><code>source</code></a>.</dd>
   1.537 +          </dl>
   1.538 +          <dl class="idl" title="[NoInterfaceObject] interface IDBTransactionEvent : IDBSuccessEvent"> 
   1.539 +            <dt>readonly attribute IDBTransaction transaction</dt>
   1.540 +            <dd>Returns the transaction used for the request 
   1.541 +            on the <a class="idlType" href="#widl-IDBEvent-source"><code>source</code></a>.</dd>
   1.542 +          </dl>
   1.543 +
   1.544 +          <dl class="idl" title="[NoInterfaceObject] interface IDBErrorEvent : IDBEvent"> 
   1.545 +            <dt>readonly attribute unsigned short code</dt>
   1.546 +            <dd>Returns the most appropriate error code from carrying out the asynchronous request
   1.547 +            on the <a class="idlType" href="#widl-IDBEvent-source"><code>source</code></a>. The 
   1.548 +            valid values of this error code are defined on the exception
   1.549 +            <a class="idlType" href="#widl-IDBDatabaseException"><code>IDBDatabaseException</code></a>.</dd>
   1.550 +            <dt>readonly attribute DOMString message</dt>
   1.551 +            <dd>Returns the describing the reason for the error. The message should be localized 
   1.552 +            to the user's language.</dd>
   1.553 +          </dl>
   1.554 +        </section>
   1.555 +        
   1.556 +        <section class="section" id="request-api">
   1.557 +          <h4>The <code>IDBRequest</code> Interface</h4>
   1.558 +          <p>
   1.559 +            The <a><code>IDBRequest</code></a> interface provides means to access results of  
   1.560 +            asynchronous requests to <a title="database">databases</a> and <a>database</a> 
   1.561 +            <a>objects</a> using <a>event handler attributes</a> [[!DOM-LEVEL-3-EVENTS]]. 
   1.562 +          </p>
   1.563 +          <div class="example">       
   1.564 +            <p>
   1.565 +              In the following example, we open a <a>database</a> asynchronously. Various 
   1.566 +              event handlers are registered for responding to various situations.
   1.567 +            </p>
   1.568 +            <codeblock>indexedDB.request.<a>onsuccess</a> = function(evt) {...};
   1.569 +indexedDB.request.<a>onerror</a> = function(evt) {...};
   1.570 +indexedDB.<a>open</a>('AddressBook', 'Address Book');</codeblock>
   1.571 +          </div>
   1.572 +          <dl class="idl" title="[NoInterfaceObject] interface IDBRequest : EventTarget"> 
   1.573 +            <dt>void abort()</dt>
   1.574 +            <dd>This method has no effect if the 
   1.575 +            <a class="idlType" href="#widl-IDBRequest-readyState"><code>readyState</code></a>
   1.576 +            is <a class="idlType" href="#widl-IDBRequest-DONE"><code>DONE</code></a>.
   1.577 +            If made on a read request, the implementation discontinues the in-flight request 
   1.578 +            even if the implementation has already read the data, and is ready to fire a
   1.579 +            <a title="event-success">success event</a>. The <a title="event-error">error event</a> 
   1.580 +            is always fired if <a class="idlType" href="#widl-IDBRequest-abort"><code>abort()</code></a> 
   1.581 +            is called, and the <a title="event-success">success event</a> is suppressed.
   1.582 +            The <a class="idlType" href="#widl-IDBRequest-readyState"><code>readyState</code></a>
   1.583 +            moves to <a class="idlType" href="#widl-IDBRequest-DONE"><code>DONE</code></a>.
   1.584 +            If the request aborts successfully, the
   1.585 +            <a class="idlType" href="#widl-IDBRequest-error"><code>error</code></a> is set
   1.586 +            to <a class="idlType" href="#widl-IDBDatabaseException-UNKNOWN_ERR"><code>UNKNOWN_ERR</code></a>.</dd>
   1.587 +            <dt>const     unsigned short LOADING = 1</dt>
   1.588 +            <dd>This state indicates that a request has been started but its results is not
   1.589 +            yet available.</dd>
   1.590 +            <dt>const     unsigned short DONE = 2</dt>
   1.591 +            <dd>This state indicates that a result to a previous request is available in
   1.592 +            the <a class="idlType" href="#widl-IDBRequest-result"><code>result</code></a> attribute.</dd>
   1.593 +            <dt>readonly attribute unsigned short readyState</dt>
   1.594 +            <dd>Every request starts in the 
   1.595 +            <a class="idlType" href="#widl-IDBRequest-INITIAL"><code>INITIAL</code></a> state.
   1.596 +            As soon as the implementation starts executing the request, its state changes to
   1.597 +            <a class="idlType" href="#widl-IDBRequest-LOADING"><code>LOADING</code></a>. When either
   1.598 +            the request completes, fails or aborts successfully, the state changes to 
   1.599 +            <a class="idlType" href="#widl-IDBRequest-DONE"><code>DONE</code></a>.</dd>
   1.600 +            <dt>attribute Function onsuccess</dt>
   1.601 +            <dd>The event handler for the <a title="event-success">success event</a></dd>
   1.602 +            <dt>attribute Function onerror</dt>
   1.603 +            <dd>The event handler for the <a title="event-error">error event</a></dd>
   1.604 +          </dl>
   1.605 +          <p>
   1.606 +            When a request is made, the 
   1.607 +            <a class="idlType" href="#widl-IDBRequest-readyState"><code>readyState</code></a> changes to 
   1.608 +            <a class="idlType" href="#widl-IDBRequest-LOADING"><code>LOADING</code></a>. 
   1.609 +            If a request completes successfully, the
   1.610 +            <a class="idlType" href="#widl-IDBRequest-readyState"><code>readyState</code></a>
   1.611 +            changes to <a class="idlType" href="#widl-IDBRequest-DONE"><code>DONE</code></a>, 
   1.612 +            the result of the request is included as the 
   1.613 +            <a class="idlType" href="#widl-IDBSuccessEvent-result"><code>result</code></a> of
   1.614 +            a new <a class="idlType" href="#widl-IDBSuccessEvent"><code>IDBSuccessEvent</code></a> 
   1.615 +            event, and <a>queue a task</a> to fire that event with the name <code>success</code>, 
   1.616 +            with no namespace, which does not bubble, is not cancelable at each 
   1.617 +            <a class="externalDFN"><code>Window</code></a> object.
   1.618 +          </p>
   1.619 +          <p>
   1.620 +            If an error occurs while performing the operation, the 
   1.621 +            <a class="idlType" href="#widl-IDBRequest-readyState"><code>readyState</code></a>
   1.622 +            changes to <a class="idlType" href="#widl-IDBRequest-DONE"><code>DONE</code></a>, 
   1.623 +            the error code and message are included in a new <a><code>IDBDatabaseError</code></a>
   1.624 +            event, and <a>queue a task</a> to fire that event with the name 
   1.625 +            <code>error</code>, with no namespace, which does not bubble, is 
   1.626 +            not cancelable at each <a class="externalDFN"><code>Window</code></a> object.
   1.627 +          </p>
   1.628 +           
   1.629 +          <p>
   1.630 +            The <span>task source</span> for these tasks is the 
   1.631 +            <dfn id="database-access-task-source">database access task source</dfn>.
   1.632 +          </p>    
   1.633 +          <p>
   1.634 +            The following are the <span>event handlers</span> (and their corresponding 
   1.635 +            <span>event handler event types</span>) that MUST be supported, as IDL
   1.636 +            attributes, by objects implementing the <a><code>IDBRequest</code></a> interface:
   1.637            </p>
   1.638            
   1.639 -          <ol>
   1.640 -            <li>
   1.641 -              If there is already a database with the given name from the origin
   1.642 -              <var>origin</var>, then let <var>db</var> be that database.
   1.643 -            </li>
   1.644 -            
   1.645 -            <li>
   1.646 -              If no database with the given name from the origin <var>origin</var>
   1.647 -              exists, then create the database <var>db</var> with the name and
   1.648 -              description passed to these steps.
   1.649 -            </li>
   1.650 -  
   1.651 -            <li>
   1.652 -              Create a <a>connection</a> to <var>db</var> and call it <var>result</var>.
   1.653 -            </li>
   1.654 -            
   1.655 -            <li>
   1.656 -              Return <var>result</var>.
   1.657 -            </li>
   1.658 -          </ol>        
   1.659 +          <table>
   1.660 +            <thead><tr>
   1.661 +              <th><span>Event handler</span> </th>
   1.662 +              <th><span>Event handler event type</span></th>
   1.663 +              <th><span>Event interface(s)</span></th>
   1.664 +            </tr></thead>
   1.665 +            <tbody>
   1.666 +              <tr>
   1.667 +                <td><dfn id="handler-request-onsuccess"><code>onsuccess</code></dfn> </td>
   1.668 +                <td> <code><dfn title="event-success">success</dfn></td>
   1.669 +                <td> <a class="idlType" href="#widl-IDBSuccessEvent"><code>IDBSuccessEvent</code></a>,
   1.670 +                <a class="idlType" href="#widl-IDBTransactionEvent"><code>IDBTransactionEvent</code></a></td>
   1.671 +              </tr>
   1.672 +              <tr>
   1.673 +                <td><dfn id="handler-request-onerror"><code>onerror</code></dfn> </td>
   1.674 +                <td> <code><dfn title="event-error">error</dfn></code></td>
   1.675 +                <td> <a class="idlType" href="#widl-IDBErrorEvent"><code>IDBErrorEvent</code></a></td>
   1.676 +              </tr>
   1.677 +            </tbody>
   1.678 +          </table>        
   1.679 +
   1.680 +          <p>
   1.681 +            The following are the <span>event handlers</span> (and their corresponding 
   1.682 +            <span>event handler event types</span>) that MUST be supported, as IDL
   1.683 +            attributes, by objects implementing the <a><code>IDBTransactionRequest</code></a> interface:
   1.684 +          </p>
   1.685 +          
   1.686 +          <table>
   1.687 +            <thead><tr>
   1.688 +              <th><span>Event handler</span> </th>
   1.689 +              <th><span>Event handler event type</span></th>
   1.690 +            </tr></thead>
   1.691 +            <tbody>
   1.692 +              <tr>
   1.693 +                <td><dfn id="handler-request-oncomplete"><code>oncomplete</code></dfn> </td>
   1.694 +                <td> <code><dfn title="event-complete">complete</dfn></td>
   1.695 +              </tr>
   1.696 +              <tr>
   1.697 +                <td><dfn id="handler-request-onabort"><code>onabort</code></dfn> </td>
   1.698 +                <td> <code><dfn title="event-abort">abort</dfn></code></td>
   1.699 +              </tr>
   1.700 +              <tr>
   1.701 +                <td><dfn id="handler-request-ontimeout"><code>ontimeout</code></dfn> </td>
   1.702 +                <td> <code><dfn title="event-timeout">timeout</dfn></code></td>
   1.703 +              </tr>
   1.704 +            </tbody>
   1.705 +          </table>        
   1.706          </section>
   1.707          
   1.708 -        <section class="section">
   1.709 -          <h4>Object Store Storage steps</h4>
   1.710 +        <section class="section" id="requests">
   1.711 +          <h4>Asynchronous Request API</h4>
   1.712 +         <p>
   1.713 +            <a title="Window"><a class="externalDFN"><code>Window</code></a> and 
   1.714 +            <a title="Worker"><a class="externalDFN"><code>Worker</code></a> objects 
   1.715 +            MUST implement the <a><code>IDBEnvironment</code></a> interface.
   1.716 +          </p>
   1.717 +          <p class="idl" title="Window implements IDBEnvironment">
   1.718 +          <p class="idl" title="Worker implements IDBEnvironment">
   1.719 +          </p>
   1.720 +          
   1.721 +          <dl class="idl" title="[NoInterfaceObject] interface IDBEnvironment">
   1.722 +            <dt>readonly attribute IDBFactoryRequest indexedDB</dt>
   1.723 +            <dd>This attribute provides applications a mechanism for accessing
   1.724 +              capabilities of indexed databases.</dd>
   1.725 +          </dl>
   1.726            <p>
   1.727 -            The <dfn>steps for storing a record into an object store</dfn> are as follows. 
   1.728 -            These steps MUST be run with four parameters: the <a>object store</a>,
   1.729 -            a value, an optional key, and an optional no-overwrite flag.
   1.730 +            Every method for making asynchronous requests returns an 
   1.731 +            <a><code>IDBRequest</code></a> object that communicates back to the requesting
   1.732 +            application through events.
   1.733 +            This design means that any number of requests can be active on any <a>database</a>
   1.734 +            or <a title="objects">object</a> handle at a time. 
   1.735            </p>
   1.736 -          <ol>
   1.737 -            <li>
   1.738 -              Let <var>store</var> be the <a>object store</a>, <var>key</var> be
   1.739 -              the key and <var>value</var> be the value passed to these steps.
   1.740 -            </li>
   1.741 -            <li>
   1.742 -              If <var>store</var> uses <a>out-of-line keys</a> but no <a>key 
   1.743 -              generator</a>, then a key MUST be passed to these steps. If not, 
   1.744 -              terminate these steps and set error code <a class="idlType" href="#widl-IDBDatabaseException-DATA_ERR"><code>DATA_ERR</code></a>.
   1.745 -            </li>
   1.746 -            <li>
   1.747 -              If <var>store</var> uses <a>in-line keys</a>, then 
   1.748 -              let <var>key</var> be the property of <var>object</var> at  
   1.749 -              <var>store</var>'s <a title="object store key path">key path</a>.
   1.750 -            </li>
   1.751 -           <li>
   1.752 -              Produce a <a>structured clone</a> of <var>value</var> and call it
   1.753 -              <var>object</var>.
   1.754 -            </li>
   1.755 -            <li>
   1.756 -              If <var>key</var> is not defined or null, then perform the 
   1.757 -              following steps.              
   1.758 +          <dl class="idl" title="[NoInterfaceObject] interface IDBFactoryRequest">
   1.759 +            <dt>readonly attribute DOMStringList databases</dt>
   1.760 +            <dd>
   1.761 +            This value is the list of the names of databases available in the global scope object.
   1.762 +            </dd>
   1.763 +            <dt>IDBRequest open()</dt>
   1.764 +            <dd>
   1.765 +              <p>
   1.766 +                This method returns immediately and runs the
   1.767 +                following steps in a different thread.
   1.768 +                If an error occurs while the <a>database</a> <a>connection</a> 
   1.769 +                is being opened, then an
   1.770 +                <a title="event-error">error event</a> is fired on this method's
   1.771 +                returned object with its 
   1.772 +                <a class="idlType" href="#widl-IDBErrorEvent-code"><code>code</code></a> set
   1.773 +                to <a class="idlType" href="#widl-IDBDatabaseException-UNKNOWN_ERR"><code>UNKNOWN_ERR</code></a>
   1.774 +                and a suitable 
   1.775 +                <a class="idlType" href="#widl-IDBErrorEvent-message"><code>message</code></a>.
   1.776 +              </p>
   1.777 +    
   1.778                <ol>
   1.779                  <li>
   1.780 -                  Using <var>store</var>'s <a>key generator</a>, produce the next
   1.781 -                  key and store it as <var>key</var>.
   1.782 +                  Let <var>origin</var> be the origin of the active document 
   1.783 +                  from which the method was invoked.                
   1.784                  </li>
   1.785                  <li>
   1.786 -                  If <var>store</var> uses <a>in-line keys</a>, then store 
   1.787 -                  <var>key</var> as the property value for <var>object</var> at  
   1.788 -                  <var>store</var>'s <a title="object store key path">key path</a>.
   1.789 +                  Perform the <a>steps for opening a database</a>, with 
   1.790 +                  <var>origin</var>, the <var>name</var> parameter and 
   1.791 +                  <var>description</var> parameter, and call its result as 
   1.792 +                  <var>result</var>.
   1.793                  </li>
   1.794 -              </ol>
   1.795 -            </li>
   1.796 -            <li>
   1.797 -              If the no-overwrite flag was passed to these steps and is set, and 
   1.798 -              a record already exists with its key being <var>key</var>, then 
   1.799 -              terminate these steps and set error code <a class="idlType" href="#widl-IDBDatabaseException-CONSTRAINT_ERR"><code>CONSTRAINT_ERR</code></a>.
   1.800 -            </li>
   1.801 -            <li>
   1.802 +                <li>
   1.803 +                  If the steps were aborted with an error code, then set this 
   1.804 +                  request's <a class="idlType" href="#widl-IDBRequest-error"><code>error</code></a> with that 
   1.805 +                  code and abort these steps.
   1.806 +                </li>
   1.807 +                <li>
   1.808 +                  Create a <a><code>IDBDatabaseRequest</code></a> object for 
   1.809 +                  <var>result</var> and call it <var>db</var>.
   1.810 +                </li>
   1.811 +                <li>
   1.812 +                  Fire a <a title="event-success">success event</a> on this 
   1.813 +                  method's returned object using the <a><code>IDBSuccessEvent</code></a> interface with its 
   1.814 +                  <a class="idlType" href="#widl-IDBSuccessEvent-result"><code>result</code></a> 
   1.815 +                  set to <var>db</var>.
   1.816 +              </ol>              
   1.817 +              <dl class="parameters">
   1.818 +                <dt>DOMString name</dt>
   1.819 +                <dd>The <a title="database name">name</a> for the <a>database</a></dd>
   1.820 +                <dt>DOMString description</dt>
   1.821 +                <dd>The description for the <a>database</a></dd>
   1.822 +              </dl>
   1.823 +              <dl class="exception" title="IDBDatabaseException">
   1.824 +                <dt>NON_TRANSIENT_ERR</dt>
   1.825 +                <dd>if the <var>name</var> parameter is not <a>valid</a></dd>
   1.826 +              </dl>
   1.827 +            </dd>
   1.828 +          </dl>
   1.829 +          <dl class="idl" title="[NoInterfaceObject] interface IDBDatabaseRequest : IDBDatabase">
   1.830 +            <dt>IDBRequest createObjectStore()</dt>
   1.831 +            <dd>
   1.832                <p>
   1.833 -                Store a record in <var>store</var> containing <var>key</var> as its key  
   1.834 -                and <var>object</var> as its value. If any <a title="index">indexes</a>  
   1.835 -                are <a>auto-populated</a> for <var>store</var>, then store a record
   1.836 -                in that index according to <a>index maintenance conditions</a>.
   1.837 +                This method returns immediately and creates a new <a>object 
   1.838 +                store</a> with the given name in the 
   1.839 +                <a title="connection">connected</a> <a>database</a>. If the specified <a>transaction</a> does not have <a>global</a> <a>scope</a>, then an  
   1.840 +                <a title="event-error">error event</a> is fired on this method's
   1.841 +                returned object with its <a class="idlType" href="#widl-IDBErrorEvent-code"><code>code</code></a>
   1.842 +                set to <a class="idlType" href="#widl-IDBDatabaseException-NOT_ALLOWED_ERR"><code>NOT_ALLOWED_ERR</code></a>
   1.843 +                and a suitable 
   1.844 +                <a class="idlType" href="#widl-IDBErrorEvent-message"><code>message</code></a>.
   1.845 +                <a>object store</a> with the same name, compared in a 
   1.846 +                case-sensitive manner, already exists in the 
   1.847 +                <a title="connection">connected</a> <a>database</a>, then an
   1.848 +                <a title="event-error">error event</a> is fired on this method's
   1.849 +                returned object with its <a class="idlType" href="#widl-IDBErrorEvent-code"><code>code</code></a>
   1.850 +                set to <a class="idlType" href="#widl-IDBDatabaseException-CONSTRAINT_ERR"><code>CONSTRAINT_ERR</code></a>
   1.851 +                and a suitable 
   1.852 +                <a class="idlType" href="#widl-IDBErrorEvent-message"><code>message</code></a>.
   1.853 +                If the <a>object store</a> is created successfully, then a
   1.854 +                <a title="event-success">success event</a> is fired on this 
   1.855 +                method's returned object using the <a><code>IDBTransactionEvent</code></a> interfacewith its 
   1.856 +                <a class="idlType" href="#widl-IDBSuccessEvent-result"><code>result</code></a> set
   1.857 +                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.858 +                to the <a>transaction</a> passed to this method.
   1.859                </p>
   1.860 -              <div class="note">
   1.861 -                Storing would mean inserting if no record exists for that key
   1.862 -                or updating an existing record, otherwise. <a title="auto-populated">
   1.863 -                Auto populated<a> <a>index</a> record will also be respectively
   1.864 -                inserted or updated depending on what storing results in.
   1.865 -              </div>
   1.866 -            </li>
   1.867 +              <dl class="parameters">
   1.868 +                <dt>IDBTransaction txn</dt>
   1.869 +                <dd>An active <a>transaction</a> open in this <a>database</a> <a>connection</a> whose <a>scope</a> is <a>static</a> and <a>global</a></dd>
   1.870 +                <dt>DOMString name</dt>
   1.871 +                <dd>The <a title="object store name">name</a> of a new <a>object store</a></dd>
   1.872 +                <dt>[TreatNullAs=EmptyString] optional DOMString keyPath</dt>
   1.873 +                <dd>The <a title="object store key path">key path</a> of a new 
   1.874 +                <a>object store</a>. If <a>empty</a> path is specified, then the 
   1.875 +                <a>object store</a> created will not have a <a>key path</a> and will
   1.876 +                use <a>out-of-line keys</a>.</dd>
   1.877 +                <dt>optional boolean autoIncrement</dt>
   1.878 +                <dd>Whether the <a>object store</a> created should have a 
   1.879 +                <a>key generator</a>. This defaults to <code>true</code>.</dd>
   1.880 +              </dl>
   1.881 +            </dd>
   1.882 +            <dt>IDBRequest objectStore()</dt>
   1.883 +            <dd>
   1.884 +              This method implicitly creates a <a>transaction</a> and opens the 
   1.885 +              <a>object store</a> with the given name in the 
   1.886 +              <a title="connection">connected</a> <a>database</a> as the
   1.887 +              <a>transaction</a>'s <a>static</a> <a>scope</a>.
   1.888 +              If the <a>object store</a> is opened, then a
   1.889 +              <a title="event-success">success event</a> is fired on this method's
   1.890 +              returned object using the <a><code>IDBTransactionEvent</code></a> 
   1.891 +              interface with its 
   1.892 +              <a class="idlType" href="#widl-IDBSuccessEvent-result"><code>result</code></a> set to a new 
   1.893 +              <a><code>IDBObjectStoreRequest</code></a> for that <a>object store</a> and  <a class="idlType" href="#widl-IDBTransactionEvent-transaction"><code>transaction</code></a> 
   1.894 +              set to a new <code>IDBTransactionRequest</code> for the 
   1.895 +              implicit <a>transaction</a>.
   1.896 +              <dl class="parameters">
   1.897 +                <dt>DOMString name</dt>
   1.898 +                <dd>The <a title="object store name">name</a> of an existing 
   1.899 +                <a>object store</a></dd>
   1.900 +                <dt>optional unsigned short mode</dt>
   1.901 +                <dd>The <a>mode</a> used to access the <a>object store</a>, which defaults to 
   1.902 +                <a class="idlType" href="#widl-IDBDatabaseObjectStore-READ_ONLY"><code>READ_ONLY</code></a>.</dd>
   1.903 +                <dt>optional unsigned long timeout</dt>
   1.904 +                <dd>The interval which this operation is allowed to take to
   1.905 +                reserve all the <a>database</a> objects identified in the new
   1.906 +                <a title="transaction">transaction's</a> <a>scope</a>. The default
   1.907 +                is user agent specific.</dd>
   1.908 +              </dl>
   1.909 +            </dd>
   1.910 +            <dt>IDBRequest openObjectStore()</dt>
   1.911 +            <dd>
   1.912 +              <p>
   1.913 +                This method returns immediately and opens the 
   1.914 +                <a>object store</a> with the given name in the 
   1.915 +                <a title="connection">connected</a> <a>database</a>
   1.916 +                for the <a>mode</a> specified. If an <a>object store</a> with 
   1.917 +                the given name does not exist in the 
   1.918 +                <a title="connection">connected</a> <a>database</a>, 
   1.919 +                then an
   1.920 +                <a title="event-error">error event</a> is fired on this method's
   1.921 +                returned object with its 
   1.922 +                <a class="idlType" href="#widl-IDBErrorEvent-code"><code>code</code></a> set to
   1.923 +                <a class="idlType" href="#widl-IDBDatabaseException-NOT_FOUND_ERR"><code>NOT_FOUND_ERR</code></a>
   1.924 +                and a suitable 
   1.925 +                <a class="idlType" href="#widl-IDBErrorEvent-message"><code>message</code></a>.
   1.926 +                If the <a>object store</a> is opened, then a
   1.927 +                <a title="event-success">success event</a> is fired on this method's
   1.928 +                returned object using the <a><code>IDBTransactionEvent</code></a> 
   1.929 +                interface with its 
   1.930 +                <a class="idlType" href="#widl-IDBSuccessEvent-result"><code>result</code></a> set to a new 
   1.931 +                <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.932 +                to the <a>transaction</a> passed to this method.
   1.933 +              </p>              
   1.934 +              <dl class="parameters">
   1.935 +                <dt>DOMString name</dt>
   1.936 +                <dd>The <a title="object store name">name</a> of an existing 
   1.937 +                <a>object store</a></dd>
   1.938 +                <dt>IDBTransaction txn</dt>
   1.939 +                <dd>An active <a>transaction</a> open in this <a>database</a> <a>connection</a></dd> 
   1.940 +                <dt>optional unsigned short mode</dt>
   1.941 +                <dd>The <a>mode</a> used to access the <a>object store</a>, which defaults to 
   1.942 +                <a class="idlType" href="#widl-IDBDatabaseObjectStore-READ_ONLY"><code>READ_ONLY</code></a>.</dd>
   1.943 +              </dl>
   1.944 +            </dd>
   1.945 +            <dt>IDBRequest removeObjectStore()</dt>
   1.946 +            <dd>
   1.947 +              <p>
   1.948 +                This method returns immediately and destroys the 
   1.949 +                <a>object store</a> with the given name in the 
   1.950 +                <a title="connection">connected</a> <a>database</a> as well as 
   1.951 +                all <a title="index">indexes</a> that are 
   1.952 +                <a title="referenced">referencing</a> that <a>object store</a>. If the specified <a>transaction</a> does not have <a>global</a> <a>scope</a>, then an  
   1.953 +                <a title="event-error">error event</a> is fired on this method's
   1.954 +                returned object with its <a class="idlType" href="#widl-IDBErrorEvent-code"><code>code</code></a>
   1.955 +                set to <a class="idlType" href="#widl-IDBDatabaseException-NOT_ALLOWED_ERR"><code>NOT_ALLOWED_ERR</code></a>
   1.956 +                and a suitable 
   1.957 +                <a class="idlType" href="#widl-IDBErrorEvent-message"><code>message</code></a>. If 
   1.958 +                an <a>object store</a> with the given name does not exist in the 
   1.959 +                <a title="connection">connected</a> <a>database</a>, 
   1.960 +                then an
   1.961 +                <a title="event-error">error event</a> is fired on this method's
   1.962 +                returned object with its 
   1.963 +                <a class="idlType" href="#widl-IDBErrorEvent-code"><code>code</code></a> set to
   1.964 +                <a class="idlType" href="#widl-IDBDatabaseException-NOT_FOUND_ERR"><code>NOT_FOUND_ERR</code></a>
   1.965 +                and a suitable 
   1.966 +                <a class="idlType" href="#widl-IDBErrorEvent-message"><code>message</code></a>.
   1.967 +                If the <a>object store</a> is destroyed successfully, then a
   1.968 +                <a title="event-success">success event</a> is fired on this 
   1.969 +                method's returned object using the <a><code>IDBTransactionEvent</code></a> interface with its 
   1.970 +                <a class="idlType" href="#widl-IDBSuccessEvent-result"><code>result</code></a> set
   1.971 +                to a <code>null</code> and <a class="idlType" href="#widl-IDBTransactionEvent-transaction"><code>transaction</code></a> set
   1.972 +                to the <a>transaction</a> passed to this method.
   1.973 +              </p>
   1.974 +              
   1.975 +              <dl class="parameters">
   1.976 +                <dt>IDBTransaction txn</dt>
   1.977 +                <dd>An active <a>transaction</a> open in this <a>database</a> 
   1.978 +                <a>connection</a> whose <a>scope</a> is <a>static</a> and 
   1.979 +                <a>global</a></dd>
   1.980 +                <dt>DOMString storeName</dt>
   1.981 +                <dd>The <a title="object store name">name</a> of an existing
   1.982 +                <a>object store</a></dd>
   1.983 +              </dl>
   1.984 +            </dd>
   1.985 +            <dt>void setVersion()</dt>
   1.986 +            <dd>
   1.987 +              This method returns immediately and sets the <a>version</a> of the 
   1.988 +              <a title="connection">connected</a> <a>database</a>.
   1.989 +              <dl class="parameters">
   1.990 +                <dt>IDBTransaction txn</dt>
   1.991 +                <dd>An active <a>transaction</a> open in this <a>database</a> 
   1.992 +                <a>connection</a> whose <a>scope</a> is <a>static</a> and 
   1.993 +                <a>global</a></dd>
   1.994 +                <dt>[TreatNullAs=EmptyString] DOMString      version</dt>
   1.995 +                <dd>The <a>version</a> to store in the <a>database</a></dd>
   1.996 +              </dl>
   1.997 +            </dd>
   1.998 +            <dt>IDBRequest openTransaction()</dt>
   1.999 +            <dd>
  1.1000 +              This method returns immediately and performs the 
  1.1001 +              <a>steps for creating a transaction</a> with either the list of 
  1.1002 +              <a>object store</a> <a title="object store name">names</a>
  1.1003 +              for acquiring locks required in this <a>transaction</a> or the 
  1.1004 +              global flag set to true, and an optional timeout duration. The global flag is set only if the list is not passed or passed as 
  1.1005 +              <code>null</code>. If a <a>transaction</a> can be created 
  1.1006 +              successfully, then a <a title="event-success">success event</a> is 
  1.1007 +              fired on this method's returned object using the 
  1.1008 +              <a><code>IDBTransactionEvent</code></a> interface with its 
  1.1009 +              <a class="idlType" href="#widl-IDBSuccessEvent-result"><code>result</code></a> set to 
  1.1010 +              a new <a><code>IDBTransactionRequest</code></a> object and 
  1.1011 +              <a class="idlType" href="#widl-IDBTransactionEvent-transaction"><code>transaction</code></a> 
  1.1012 +              set to the <a>transaction</a> passed to this method. If reserving all the 
  1.1013 +              <a>object store</a>s identified in the requested <a>scope</a> 
  1.1014 +              takes longer than the specified timeout interval, then an
  1.1015 +              <a title="event-error">error event</a> is fired on this method's
  1.1016 +              returned object with its 
  1.1017 +              <a class="idlType" href="#widl-IDBErrorEvent-code"><code>code</code></a> set to
  1.1018 +              <a class="idlType" href="#widl-IDBDatabaseException-TIMEOUT_ERR"><code>TIMEOUT_ERR</code></a>
  1.1019 +              and a suitable 
  1.1020 +              <a class="idlType" href="#widl-IDBErrorEvent-message"><code>message</code></a>.
  1.1021 +              <dl class="parameters">
  1.1022 +                <dt>optional DOMStringList storeNames</dt>
  1.1023 +                <dd>The names of <a title="object store">object stores</a> and 
  1.1024 +                <a title="index">indexes</a> in the <a>scope</a> of the new
  1.1025 +                <a>transaction</a></dd>
  1.1026 +                <dt>optional IDBTransaction parent</dt>
  1.1027 +                <dd>An active <a>transaction</a> open in this <a>database</a> 
  1.1028 +                <a>connection</a></dd>
  1.1029 +                <dt>optional unsigned long timeout</dt>
  1.1030 +                <dd>The interval which this operation is allowed to take to
  1.1031 +                reserve all the <a>database</a> objects identified in the new
  1.1032 +                <a title="transaction">transaction's</a> <a>scope</a>. The default
  1.1033 +                is user agent specific</dd>
  1.1034 +              </dl>
  1.1035 +            </dd>
  1.1036 +          </dl>
  1.1037 +          <dl class="idl" title="[NoInterfaceObject] interface IDBObjectStoreRequest : IDBObjectStore">
  1.1038 +            <dt>IDBRequest put()</dt>
  1.1039 +            <dd>
  1.1040 +              This method returns immediately and stores the given value in this 
  1.1041 +              <a>object store</a> by following the 
  1.1042 +              <a>steps for storing a record into an object store</a>. If the 
  1.1043 +              record can be successfully stored in the <a>object store</a>, then 
  1.1044 +              a <a title="event-success">success event</a> is fired on this 
  1.1045 +              method's returned object with its 
  1.1046 +              <a class="idlType" href="#widl-IDBSuccessEvent-result"><code>result</code></a> set to
  1.1047 +              the key for the stored record. If this <a>object store</a> uses 
  1.1048 +              <a>out-of-line</a> keys but does not use a <a>key generator</a> 
  1.1049 +              and the <var>key</var> parameter was not passed, then an
  1.1050 +              <a title="event-error">error event</a> is fired on this method's
  1.1051 +              returned object with its 
  1.1052 +              <a class="idlType" href="#widl-IDBErrorEvent-code"><code>code</code></a> set to
  1.1053 +              <a class="idlType" href="#widl-IDBDatabaseException-DATA_ERR"><code>DATA_ERR</code></a>
  1.1054 +              and a suitable 
  1.1055 +              <a class="idlType" href="#widl-IDBErrorEvent-message"><code>message</code></a>.
  1.1056 +              If the data being stored could not be serialized by the <a>internal structured cloning algorithm</a>, then an
  1.1057 +              <a title="event-error">error event</a> is fired on this method's
  1.1058 +              returned object with its 
  1.1059 +              <a class="idlType" href="#widl-IDBErrorEvent-code"><code>code</code></a> set to
  1.1060 +              <a class="idlType" href="#widl-IDBDatabaseException-SERIAL_ERR"><code>SERIAL_ERR</code></a>
  1.1061 +              and a suitable 
  1.1062 +              <a class="idlType" href="#widl-IDBErrorEvent-message"><code>message</code></a>.
  1.1063 +              <dl class="parameters">
  1.1064 +                <dt>any value</dt>
  1.1065 +                <dd>The value to be stored in the record</dd>
  1.1066 +                <dt>optional any key</dt>
  1.1067 +                <dd>The key used to identify the record, which defaults to 
  1.1068 +                <code>null</code></dd>
  1.1069 +              </dl>
  1.1070 +            </dd>
  1.1071 +            <dt>IDBRequest add()</dt>
  1.1072 +            <dd>
  1.1073 +              This method returns immediately and stores the given value in this 
  1.1074 +              <a>object store</a> by following the 
  1.1075 +              <a>steps for storing a record into an object store</a> with the no-overwrite flag
  1.1076 +              set. If the record
  1.1077 +              can be successfully stored in the <a>object store</a>, then the 
  1.1078 +              <a class="idlType" href="#widl-IDBRequest-result"><code>result</code></a>
  1.1079 +              of this object's request is set to the key for the stored record.
  1.1080 +              If a record exists
  1.1081 +              in this <a>object store</a> for the key <var>key</var> parameter, then an
  1.1082 +              <a title="event-error">error event</a> is fired on this method's
  1.1083 +              returned object with its 
  1.1084 +              <a class="idlType" href="#widl-IDBErrorEvent-code"><code>code</code></a> set to
  1.1085 +              <a class="idlType" href="#widl-IDBDatabaseException-CONSTRAINT_ERR"><code>CONSTRAINT_ERR</code></a>
  1.1086 +              If this <a>object store</a> uses 
  1.1087 +              <a>out-of-line</a> keys but does not use a <a>key generator</a> and the
  1.1088 +              <var>key</var> parameter was not passed, then an
  1.1089 +              <a title="event-error">error event</a> is fired on this method's
  1.1090 +              returned object with its 
  1.1091 +              <a class="idlType" href="#widl-IDBErrorEvent-code"><code>code</code></a> set to
  1.1092 +              <a class="idlType" href="#widl-IDBDatabaseException-DATA_ERR"><code>DATA_ERR</code></a>
  1.1093 +              and a suitable 
  1.1094 +              <a class="idlType" href="#widl-IDBErrorEvent-message"><code>message</code></a>.
  1.1095 +              If the data being 
  1.1096 +              stored could not be serialized by the <a>internal structured cloning algorithm</a>,
  1.1097 +              then an
  1.1098 +              <a title="event-error">error event</a> is fired on this method's
  1.1099 +              returned object with its 
  1.1100 +              <a class="idlType" href="#widl-IDBErrorEvent-code"><code>code</code></a> set to
  1.1101 +              <a class="idlType" href="#widl-IDBDatabaseException-SERIAL_ERR"><code>SERIAL_ERR</code></a>
  1.1102 +              and a suitable 
  1.1103 +              <a class="idlType" href="#widl-IDBErrorEvent-message"><code>message</code></a>.
  1.1104 +              <dl class="parameters">
  1.1105 +                <dt>any value</dt>
  1.1106 +                <dd>The value to be stored in the record</dd>
  1.1107 +                <dt>optional any key</dt>
  1.1108 +                <dd>The key used to identify the record, which defaults to 
  1.1109 +                <code>null</code></dd>
  1.1110 +              </dl>
  1.1111 +            </dd>
  1.1112 +            <dt>IDBRequest remove()</dt>
  1.1113 +            <dd>
  1.1114 +              This method returns immediately and removes the record from this 
  1.1115 +              <a>object store</a> by following the 
  1.1116 +              <a>steps for deleting a record from an object store</a> 
  1.1117 +              corresponding to the given key. If a record did not exist in this 
  1.1118 +              <a>object store</a> for the key <var>key</var> parameter, then an 
  1.1119 +              <a title="event-error">error event</a> is fired on this method's
  1.1120 +              returned object with its 
  1.1121 +              <a class="idlType" href="#widl-IDBErrorEvent-code"><code>code</code></a> set to
  1.1122 +              <a class="idlType" href="#widl-IDBDatabaseException-NOT_FOUND_ERR"><code>NOT_FOUND_ERR</code></a>
  1.1123 +              and a suitable 
  1.1124 +              <a class="idlType" href="#widl-IDBErrorEvent-message"><code>message</code></a>.
  1.1125 +              <dl class="parameters">
  1.1126 +                <dt>any key</dt>
  1.1127 +                <dd>Key identifying the record to be removed</dd>
  1.1128 +              </dl>
  1.1129 +            </dd>
  1.1130 +            <dt>IDBRequest get()</dt>
  1.1131 +            <dd>
  1.1132 +              This method returns immediately and retrieves the value from this 
  1.1133 +              <a>object store</a> for the record corresponding to the given key 
  1.1134 +              by following the 
  1.1135 +              <a>steps for retrieving a record from an object store</a>. 
  1.1136 +              If the operation is successful, then the 
  1.1137 +              <a class="idlType" href="#widl-IDBRequest-result"><code>result</code></a> of this object's request
  1.1138 +              is set to the retrieved value. If a record did not exist in this 
  1.1139 +              <a>object store</a> for the key <var>key</var> parameter, then an 
  1.1140 +              <a title="event-error">error event</a> is fired on this method's
  1.1141 +              returned object with its 
  1.1142 +              <a class="idlType" href="#widl-IDBErrorEvent-code"><code>code</code></a> set to
  1.1143 +              <a class="idlType" href="#widl-IDBDatabaseException-NOT_FOUND_ERR"><code>NOT_FOUND_ERR</code></a>
  1.1144 +              and a suitable 
  1.1145 +              <a class="idlType" href="#widl-IDBErrorEvent-message"><code>message</code></a>.
  1.1146 +              <dl class="parameters">
  1.1147 +                <dt>any key</dt>
  1.1148 +                <dd>Key identifying the record to be retrieved</dd>
  1.1149 +              </dl>
  1.1150 +            </dd>
  1.1151 +            <dt>IDBRequest openCursor()</dt>
  1.1152 +            <dd>
  1.1153 +              This method returns immediately and creates a <a>cursor</a> over the 
  1.1154 +              <a>records</a> of this <a>object store</a>. The <a>range</a> of this
  1.1155 +              <a>cursor</a> matches the <a>key range</a> specified as the
  1.1156 +              <var>range</var> parameter, or if that parameter is not specified or
  1.1157 +              <code>null</code>, then the range includes all the <a>records</a>. 
  1.1158 +              If there is even a single record that matches the <a>key range</a>, then a
  1.1159 +              <a title="event-success">success event</a> is fired on this method's
  1.1160 +              returned object with its 
  1.1161 +              <a class="idlType" href="#widl-IDBSuccessEvent-result"><code>result</code></a> set to the
  1.1162 +              <a><code>IDBCursorRequest</code></a> object for that <a>cursor</a>. If no
  1.1163 +              records match the <a>key range</a>, then an 
  1.1164 +              <a title="event-error">error event</a> is fired on this method's
  1.1165 +              returned object with its 
  1.1166 +              <a class="idlType" href="#widl-IDBErrorEvent-code"><code>code</code></a> set to
  1.1167 +              <a class="idlType" href="#widl-IDBDatabaseException-NOT_FOUND_ERR"><code>NOT_FOUND_ERR</code></a>
  1.1168 +              and a suitable 
  1.1169 +              <a class="idlType" href="#widl-IDBErrorEvent-message"><code>message</code></a>.
  1.1170 +              <dl class="parameters">
  1.1171 +                <dt>optional IDBKeyRange    range</dt>
  1.1172 +                <dd>The <a>key range</a> to use as the <a>cursor</a>'s <a>range</a></dd>
  1.1173 +                <dt>optional unsigned short direction</dt>
  1.1174 +                <dd>The <a>cursor<a>'s required <a>direction</a></dd>
  1.1175 +              </dl>
  1.1176 +            </dd>
  1.1177 +            <dt>IDBRequest createIndex()</dt>
  1.1178 +            <dd>
  1.1179 +              <p>
  1.1180 +                This method returns immediately and creates a new <a>index</a>
  1.1181 +                with the given name and parameters in the 
  1.1182 +                <a title="connection">connected</a> <a>database</a>. If an <a>index</a> 
  1.1183 +                with the same name, compared in a case-sensitive manner, already exists
  1.1184 +                in the <a title="connection">connected</a> <a>database</a>, then an 
  1.1185 +                <a title="event-error">error event</a> is fired on this method's
  1.1186 +                returned object with its 
  1.1187 +                <a class="idlType" href="#widl-IDBErrorEvent-code"><code>code</code></a> set to
  1.1188 +                <a class="idlType" href="#widl-IDBDatabaseException-CONSTRAINT_ERR"><code>CONSTRAINT_ERR</code></a>
  1.1189 +                and a suitable 
  1.1190 +                <a class="idlType" href="#widl-IDBErrorEvent-message"><code>message</code></a>.
  1.1191 +                If the <a>object store</a> with the
  1.1192 +                given name does not exist in the <a title="connection">connected</a> 
  1.1193 +                <a>database</a> then an 
  1.1194 +                <a title="event-error">error event</a> is fired on this method's
  1.1195 +                returned object with its 
  1.1196 +                <a class="idlType" href="#widl-IDBErrorEvent-code"><code>code</code></a> set to
  1.1197 +                <a class="idlType" href="#widl-IDBDatabaseException-NOT_FOUND_ERR"><code>NOT_FOUND_ERR</code></a>
  1.1198 +                and a suitable 
  1.1199 +                <a class="idlType" href="#widl-IDBErrorEvent-message"><code>message</code></a>.
  1.1200 +                If the <a>index</a> is created, then a
  1.1201 +                <a title="event-success">success event</a> is fired on this method's
  1.1202 +                returned object with its 
  1.1203 +                <a class="idlType" href="#widl-IDBSuccessEvent-result"><code>result</code></a> set to a new
  1.1204 +                <a><code>IDBIndexRequest</code></a> for that <a>index</a>.
  1.1205 +              </p>
  1.1206 +              <dl class="parameters">
  1.1207 +                <dt>DOMString      name</dt>
  1.1208 +                <dd>The <a title="index name">name</a> of a new <a>index</a></dd>
  1.1209 +                <!-- this is removed because it is implicit on the store
  1.1210 +                <dt>DOMString      storeName</dt>
  1.1211 +                <dd>The <a title="object store name">name</a> of an existing
  1.1212 +                <a>object store</a> <a>referenced</a> by the new <a>index</a></dd>-->
  1.1213 +                <dt>DOMString      keyPath</dt>
  1.1214 +                <dd>The <a title="index key path">key path used by the new
  1.1215 +                <a>index</a></dd>
  1.1216 +                <dt>optional boolean unique</dt>
  1.1217 +                <dd>The <a>unique</a> flag for the new <a>index</a></dd>
  1.1218 +              </dl>
  1.1219 +            </dd>
  1.1220 +            <dt>IDBIndexRequest index()</dt>
  1.1221 +            <dd>
  1.1222 +              <p>
  1.1223 +                This method returns immediately and opens the <a>index</a> with the
  1.1224 +                given name in the <a title="connection">connected</a> <a>database</a>.
  1.1225 +                If an <a>index</a> with the given
  1.1226 +                name does not exist in the <a title="connection">connected</a> <a>database</a>, then an
  1.1227 +                <a title="event-error">error event</a> is fired on this method's
  1.1228 +                returned object with its 
  1.1229 +                <a class="idlType" href="#widl-IDBErrorEvent-code"><code>code</code></a> set to
  1.1230 +                <a class="idlType" href="#widl-IDBDatabaseException-NOT_FOUND_ERR"><code>NOT_FOUND_ERR</code></a>
  1.1231 +                and a suitable 
  1.1232 +                <a class="idlType" href="#widl-IDBErrorEvent-message"><code>message</code></a>.
  1.1233 +                If the <a>index</a> is opened, then a
  1.1234 +                <a title="event-success">success event</a> is fired on this method's
  1.1235 +                returned object with its 
  1.1236 +                <a class="idlType" href="#widl-IDBSuccessEvent-result"><code>result</code></a> set to a new 
  1.1237 +                <a><code>IDBIndexRequest</code></a> for that <a>index</a>.
  1.1238 +              </p>              
  1.1239 +              <dl class="parameters">
  1.1240 +                <dt>DOMString name</dt>
  1.1241 +                <dd>The <a title="index name">name</a> of an existing <a>index</a></dd>
  1.1242 +              </dl>      
  1.1243 +            </dd>
  1.1244 +            <dt>IDBRequest removeIndex()</dt>
  1.1245 +            <dd>
  1.1246 +              <p>
  1.1247 +                This method returns immediately and destroys the <a>index</a>
  1.1248 +                with the given name in the <a title="connection">connected</a> 
  1.1249 +                <a>database</a>. If an <a>index</a> with the given name does not 
  1.1250 +                exist in the <a title="connection">connected</a> <a>database</a>, then an
  1.1251 +                <a title="event-error">error event</a> is fired on this method's
  1.1252 +                returned object with its 
  1.1253 +                <a class="idlType" href="#widl-IDBErrorEvent-code"><code>code</code></a> set to
  1.1254 +                <a class="idlType" href="#widl-IDBDatabaseException-NOT_FOUND_ERR"><code>NOT_FOUND_ERR</code></a>
  1.1255 +                and a suitable 
  1.1256 +                <a class="idlType" href="#widl-IDBErrorEvent-message"><code>message</code></a>.
  1.1257 +              </p>
  1.1258 +              <dl class="parameters">
  1.1259 +                <dt>DOMString indexName</dt>
  1.1260 +                <dd>The <a title="index name">name</a> of an existing <a>index</a></dd>
  1.1261 +              </dl>
  1.1262 +            </dd>
  1.1263 +          </dl>
  1.1264 +          <dl class="idl" title="[NoInterfaceObject] interface IDBIndexRequest : IDBIndex">
  1.1265 +            <dt>IDBCursorRequest openObjectCursor()</dt>
  1.1266 +            <dd>
  1.1267 +              This method returns immediately and creates a <a>cursor</a> over the 
  1.1268 +              <a>records</a> of this <a>index</a>'s <a>referenced</a> <a>object store</a> 
  1.1269 +              as arranged by this <a>index</a>. The <a>range</a> of this <a>cursor</a> 
  1.1270 +              matches the <a>key range</a> specified as the <var>range</var> parameter, or
  1.1271 +              if that parameter is not specified or <code>null</code>, then the 
  1.1272 +              range includes all the <a>records</a>.
  1.1273 +              If there is even a single record that matches the <a>key range</a>, then a
  1.1274 +              <a title="event-success">success event</a> is fired on this method's
  1.1275 +              returned object with its 
  1.1276 +              <a class="idlType" href="#widl-IDBSuccessEvent-result"><code>result</code></a> set to the
  1.1277 +              <a><code>IDBCursorRequest</code></a> object for that <a>cursor</a>. If no
  1.1278 +              records match the <a>key range</a>, then an
  1.1279 +              <a title="event-error">error event</a> is fired on this method's
  1.1280 +              returned object with its 
  1.1281 +              <a class="idlType" href="#widl-IDBErrorEvent-code"><code>code</code></a> set to
  1.1282 +              <a class="idlType" href="#widl-IDBDatabaseException-NOT_FOUND_ERR"><code>NOT_FOUND_ERR</code></a>
  1.1283 +              and a suitable 
  1.1284 +              <a class="idlType" href="#widl-IDBErrorEvent-message"><code>message</code></a>.
  1.1285 +              <dl class="parameters">
  1.1286 +                <dt>optional IDBKeyRange    range</dt>
  1.1287 +                <dd>The <a>key range</a> to use as the <a>cursor</a>'s <a>range</a></dd>
  1.1288 +                <dt>optional unsigned short direction</dt>
  1.1289 +                <dd>The <a>cursor<a>'s required <a>direction</a></dd>
  1.1290 +              </dl>
  1.1291 +            </dd>
  1.1292 +            <dt>IDBRequest openCursor()</dt>
  1.1293 +            <dd>
  1.1294 +              This method returns immediately and creates a <a>cursor</a> over the 
  1.1295 +              <a>records</a> of this <a>index</a>. The <a>range</a> of this <a>cursor</a>
  1.1296 +              matches the <a>key range</a> specified as the <var>range</var> parameter, or
  1.1297 +              if that parameter is not specified or <code>null</code>, then the 
  1.1298 +              range includes all the <a>records</a>. 
  1.1299 +              If there is even a single record that matches the <a>key range</a>, then a
  1.1300 +              <a title="event-success">success event</a> is fired on this method's
  1.1301 +              returned object with its 
  1.1302 +              <a class="idlType" href="#widl-IDBSuccessEvent-result"><code>result</code></a> set to the 
  1.1303 +              <a><code>IDBCursorRequest</code></a> object for that <a>cursor</a>. If no
  1.1304 +              records match the <a>key range</a>, then an
  1.1305 +              <a title="event-error">error event</a> is fired on this method's
  1.1306 +              returned object with its 
  1.1307 +              <a class="idlType" href="#widl-IDBErrorEvent-code"><code>code</code></a> set to
  1.1308 +              <a class="idlType" href="#widl-IDBDatabaseException-NOT_FOUND_ERR"><code>NOT_FOUND_ERR</code></a>
  1.1309 +              and a suitable 
  1.1310 +              <a class="idlType" href="#widl-IDBErrorEvent-message"><code>message</code></a>.
  1.1311 +              <dl class="parameters">
  1.1312 +                <dt>optional IDBKeyRange    range</dt>
  1.1313 +                <dd>The <a>key range</a> to use as the <a>cursor</a>'s <a>range</a></dd>
  1.1314 +                <dt>optional unsigned short direction</dt>
  1.1315 +                <dd>The <a>cursor<a>'s required <a>direction</a></dd>
  1.1316 +              </dl>
  1.1317 +            </dd>
  1.1318 +            <dt>IDBRequest put()</dt>
  1.1319 +            <dd>
  1.1320 +              This method returns immediately and stores the given value in this <a>index</a>
  1.1321 +              by following the <a>steps for storing a record into an index</a>. If the
  1.1322 +              operation succeeds, then a
  1.1323 +              <a title="event-success">success event</a> is fired on this method's
  1.1324 +              returned object with its 
  1.1325 +              <a class="idlType" href="#widl-IDBSuccessEvent-result"><code>result</code></a> set to the
  1.1326 +              key for the stored record. 
  1.1327 +              <dl class="parameters">
  1.1328 +                <dt>any value</dt>
  1.1329 +                <dd>The value to be stored in the record</dd>
  1.1330 +                <dt>optional any key</dt>
  1.1331 +                <dd>The key used to identify the record</dd>
  1.1332 +              </dl>
  1.1333 +            </dd>
  1.1334 +            <dt>IDBRequest add()</dt>
  1.1335 +            <dd>
  1.1336 +              This method returns immediately and stores the given value in this <a>index</a>
  1.1337 +              by following the <a>steps for storing a record into an index</a>. If the
  1.1338 +              operation succeeds, then a
  1.1339 +              <a title="event-success">success event</a> is fired on this method's
  1.1340 +              returned object with its 
  1.1341 +              <a class="idlType" href="#widl-IDBSuccessEvent-result"><code>result</code></a> set to a the
  1.1342 +              key for the stored record. If a record exists in this <a>index</a> for the key 
  1.1343 +              <var>key</var> parameter or this <a>index</a> is <a>auto-populated</a> or if no
  1.1344 +              record exists with key <var>value</var> parameter in the <a>index</a>'s
  1.1345 +              <a>referenced</a> <a>object store</a>, then an
  1.1346 +              <a title="event-error">error event</a> is fired on this method's
  1.1347 +              returned object with its 
  1.1348 +              <a class="idlType" href="#widl-IDBErrorEvent-code"><code>code</code></a> set to
  1.1349 +              <a class="idlType" href="#widl-IDBDatabaseException-CONSTRAINT_ERR"><code>CONSTRAINT_ERR</code></a>
  1.1350 +              <dl class="parameters">
  1.1351 +                <dt>any value</dt>
  1.1352 +                <dd>The value to be stored in the record</dd>
  1.1353 +                <dt>optional any key</dt>
  1.1354 +                <dd>The key used to identify the record</dd>
  1.1355 +              </dl>
  1.1356 +            </dd>
  1.1357 +            <dt>IDBRequest getObject()</dt>
  1.1358 +            <dd>
  1.1359 +              This method returns immediately and retrieves the value from this <a>index</a>'s
  1.1360 +              <a>referenced</a> <a>object store</a> for the record corresponding to the given
  1.1361 +              key by following the <a>steps for retrieving a record from an index</a>.
  1.1362 +              If the operation is successful, then the 
  1.1363 +              <a class="idlType" href="#widl-IDBRequest-result"><code>result</code></a> of this object's request
  1.1364 +              is set to the retrieved value. If a record did not exist in this 
  1.1365 +              <a>index</a> for the key <var>key</var> parameter, then an
  1.1366 +              <a title="event-error">error event</a> is fired on this method's
  1.1367 +              returned object with its 
  1.1368 +              <a class="idlType" href="#widl-IDBErrorEvent-code"><code>code</code></a> set to
  1.1369 +              <a class="idlType" href="#widl-IDBDatabaseException-NOT_FOUND_ERR"><code>NOT_FOUND_ERR</code></a>
  1.1370 +              and a suitable 
  1.1371 +              <a class="idlType" href="#widl-IDBErrorEvent-message"><code>message</code></a>.
  1.1372 +              <dl class="parameters">
  1.1373 +                <dt>any key</dt>
  1.1374 +                <dd>Key identifying the record to be retrieved</dd>
  1.1375 +              </dl>
  1.1376 +            </dd>
  1.1377 +            <dt>IDBRequest get()</dt>
  1.1378 +            <dd>
  1.1379 +              This method returns immediately and retrieves the value from this <a>index</a>
  1.1380 +              for the record corresponding to the given <var>key</var> parameter by 
  1.1381 +              following the <a>steps for retrieving a value from an index</a>.
  1.1382 +              If the operation is successful, then the 
  1.1383 +              <a class="idlType" href="#widl-IDBRequest-result"><code>result</code></a> of this object's request
  1.1384 +              is set to the retrieved value. If a record did not exist in this 
  1.1385 +              <a>index</a> for the key <var>key</var> parameter, then an
  1.1386 +              <a title="event-error">error event</a> is fired on this method's
  1.1387 +              returned object with its 
  1.1388 +              <a class="idlType" href="#widl-IDBErrorEvent-code"><code>code</code></a> set to
  1.1389 +              <a class="idlType" href="#widl-IDBDatabaseException-NOT_FOUND_ERR"><code>NOT_FOUND_ERR</code></a>
  1.1390 +              and a suitable 
  1.1391 +              <a class="idlType" href="#widl-IDBErrorEvent-message"><code>message</code></a>.
  1.1392 +              <dl class="parameters">
  1.1393 +                <dt>any key</dt>
  1.1394 +                <dd>Key identifying the record to be retrieved</dd>
  1.1395 +              </dl>
  1.1396 +            </dd>
  1.1397 +            <dt>IDBRequest remove()</dt>
  1.1398 +            <dd>
  1.1399 +              This method returns immediately and removes the records from this <a>index</a>
  1.1400 +              by following the <a>steps for deleting a record from an index</a>
  1.1401 +              corresponding to the given key. If a record did not exist in this 
  1.1402 +              <a>index</a> for the key <var>key</var> parameter, then an
  1.1403 +              <a title="event-error">error event</a> is fired on this method's
  1.1404 +              returned object with its 
  1.1405 +              <a class="idlType" href="#widl-IDBErrorEvent-code"><code>code</code></a> set to
  1.1406 +              <a class="idlType" href="#widl-IDBDatabaseException-NOT_FOUND_ERR"><code>NOT_FOUND_ERR</code></a>
  1.1407 +              and a suitable 
  1.1408 +              <a class="idlType" href="#widl-IDBErrorEvent-message"><code>message</code></a>.
  1.1409 +              <dl class="parameters">
  1.1410 +                <dt>any key</dt>
  1.1411 +                <dd>Key identifying the record to be removed</dd>
  1.1412 +              </dl>
  1.1413 +            </dd>
  1.1414 +          </dl>
  1.1415 +          <dl class="idl" title="[NoInterfaceObject] interface IDBCursorRequest : IDBCursor">
  1.1416 +            <dt>readonly attribute any key</dt>
  1.1417 +            <dd>The key for the record at the <a>cursor</a>'s <a>position</a>.</dd>
  1.1418 +            <dt>readonly attribute any value</dt>
  1.1419 +            <dd>The value for the record at the <a>cursor</a>'s <a>position</a>.</dd>
  1.1420 +            <dt>readonly attribute unsigned long long count</dt>
  1.1421 +            <dd>             
  1.1422 +              On getting, provide the approximate number of objects in the cursor.
  1.1423 +            </dd>
  1.1424 +            <dt>IDBRequest update(in any value)</dt>
  1.1425 +            <dd>
  1.1426 +              This method returns immediately and sets the value for the record at the
  1.1427 +              <a>cursor</a>'s <a>position</a>. If the underlying <a>object store</a> uses
  1.1428 +              <a>in-line keys</a> and the property at the 
  1.1429 +              <a title="object store key path">key path</a> does not match the key in this
  1.1430 +              <a>cursor</a>'s <a>position</a>, then an
  1.1431 +              <a title="event-error">error event</a> is fired on this method's
  1.1432 +              returned object with its 
  1.1433 +              <a class="idlType" href="#widl-IDBErrorEvent-code"><code>code</code></a> set to
  1.1434 +              <a class="idlType" href="#widl-IDBDatabaseException-DATA_ERR"><code>DATA_ERR</code></a>
  1.1435 +              and a suitable 
  1.1436 +              <a class="idlType" href="#widl-IDBErrorEvent-message"><code>message</code></a>.                             
  1.1437 +              If the underlying 
  1.1438 +              <a>index</a> or <a>object store</a> does not support updating the item 
  1.1439 +              because it is open in the <a class="idlType" href="#widl-IDBObjectStore-READ_ONLY"><code>READ_ONLY</code></a> or 
  1.1440 +              <a class="idlType" href="#widl-IDBObjectStore-SNAPSHOT_READ"><code>SNAPSHOT_READ</code></a> <a>mode</a>, then an
  1.1441 +              <a title="event-error">error event</a> is fired on this method's
  1.1442 +              returned object with its 
  1.1443 +              <a class="idlType" href="#widl-IDBErrorEvent-code"><code>code</code></a> set to
  1.1444 +              <a class="idlType" href="#widl-IDBDatabaseException-NOT_ALLOWED_ERR"><code>NOT_ALLOWED_ERR</code></a>
  1.1445 +              and a suitable 
  1.1446 +              <a class="idlType" href="#widl-IDBErrorEvent-message"><code>message</code></a>.
  1.1447 +              If the data being stored could not be serialized by the 
  1.1448 +              <a>internal structured cloning algorithm</a>,  then an
  1.1449 +              <a title="event-error">error event</a> is fired on this method's
  1.1450 +              returned object with its 
  1.1451 +              <a class="idlType" href="#widl-IDBErrorEvent-code"><code>code</code></a> set to
  1.1452 +              <a class="idlType" href="#widl-IDBDatabaseException-SERIAL_ERR"><code>SERIAL_ERR</code></a>
  1.1453 +              and a suitable 
  1.1454 +              <a class="idlType" href="#widl-IDBErrorEvent-message"><code>message</code></a>.
  1.1455 +            </dd>
  1.1456 +            <dt>boolean    continue()</dt>
  1.1457 +            <dd>
  1.1458 +              This method returns immediately and advances the <a>cursor</a> to the next
  1.1459 +              position along its <a>direction</a> to the item whose key matches the
  1.1460 +              optional parameter. If no such parameter is provided, advance to the
  1.1461 +              immediate next position. If the <a>cursor</a> has reached the end of its
  1.1462 +              <a>range</a>, then an
  1.1463 +              <a title="event-error">error event</a> is fired on this method's
  1.1464 +              returned object with its 
  1.1465 +              <a class="idlType" href="#widl-IDBErrorEvent-code"><code>code</code></a> set to
  1.1466 +              <a class="idlType" href="#widl-IDBDatabaseException-NOT_ALLOWED_ERR"><code>NOT_ALLOWED_ERR</code></a>
  1.1467 +              and a suitable 
  1.1468 +              <a class="idlType" href="#widl-IDBErrorEvent-message"><code>message</code></a>.
  1.1469 +              <dl class="parameters">
  1.1470 +                <dt>optional any key</dt>
  1.1471 +                <dd>The next key to position this <a>cursor</a> at</dd>
  1.1472 +              </dl>
  1.1473 +            </dd>
  1.1474              
  1.1475 -            <li>
  1.1476 -              Return the <var>key</var>.
  1.1477 -            </li>
  1.1478 -          </ol>
  1.1479 -        </section>
  1.1480 -        
  1.1481 -        <section class="section">
  1.1482 -          <h4>Index Storage steps</h4>
  1.1483 -          <p>
  1.1484 -            The <dfn>steps for storing a record into an index</dfn> are as follows. 
  1.1485 -            These steps MUST be run with four parameters: the <a>index</a>,
  1.1486 -            a key, a value, and a no-overwrite flag.
  1.1487 -          </p>
  1.1488 -          <ol>
  1.1489 -            <li>
  1.1490 -              Let <var>index</var> be the <a>index</a>, <var>key</var> be
  1.1491 -              the key and <var>value</var> be the value passed to these steps.
  1.1492 -            </li>
  1.1493 -            <li>
  1.1494 -              If <var>index</var> has a <a title="index key path">key path</a>,
  1.1495 -              then terminate these steps and set error code <a class="idlType" href="#widl-IDBDatabaseException-CONSTRAINT_ERR"><code>CONSTRAINT_ERR</code></a>.
  1.1496 -            </li>
  1.1497 -            <li>
  1.1498 -              If the no-overwrite flag was passed to these steps and is set, and 
  1.1499 -              a record already exists in <var>index</var> with its key being 
  1.1500 -              <var>key</var>, then terminate these steps and set error code 
  1.1501 -              <a class="idlType" href="#widl-IDBDatabaseException-CONSTRAINT_ERR"><code>CONSTRAINT_ERR</code></a>.
  1.1502 -            </li>
  1.1503 -            <li>
  1.1504 -              If no record exists in <var>index</var>'s <a>referenced</a>
  1.1505 -              <a>object store</a> whose key is <var>value</var>, then terminate
  1.1506 -              these steps and set error code <a class="idlType" href="#widl-IDBDatabaseException-CONSTRAINT_ERR"><code>CONSTRAINT_ERR</code></a>.
  1.1507 -            </li>
  1.1508 -            <li>
  1.1509 +            <dt>IDBRequest    remove()</dt>
  1.1510 +            <dd>          
  1.1511                <p>
  1.1512 -                Store a record in <var>index</var> containing <var>key</var> as its key  
  1.1513 -                and <var>value</var> as its value. 
  1.1514 +                This method returns immediately and deletes the object at the 
  1.1515 +                <a>cursor</a>'s <a>position</a>. The cursor's
  1.1516 +                position is not changed. Any attempts to retrieve the cursor's
  1.1517 +                current value will return <code>null</code>. If the underlying 
  1.1518 +                <a>index</a> or <a>object store</a> does not support updating the item 
  1.1519 +                because it is open in the 
  1.1520 +                <a class="idlType" href="#widl-IDBObjectStore-READ_ONLY"><code>READ_ONLY</code></a> or 
  1.1521 +                <a class="idlType" href="#widl-IDBObjectStore-SNAPSHOT_READ"><code>SNAPSHOT_READ</code></a> 
  1.1522 +                <a>mode</a>, then an
  1.1523 +                <a title="event-error">error event</a> is fired on this method's
  1.1524 +                returned object with its 
  1.1525 +                <a class="idlType" href="#widl-IDBErrorEvent-code"><code>code</code></a> set to
  1.1526 +                <a class="idlType" href="#widl-IDBDatabaseException-NOT_ALLOWED_ERR"><code>NOT_ALLOWED_ERR</code></a>
  1.1527 +                and a suitable 
  1.1528 +                <a class="idlType" href="#widl-IDBErrorEvent-message"><code>message</code></a>.
  1.1529                </p>
  1.1530 -              <div class="note">
  1.1531 -                Storing would mean inserting if no record exists for that key
  1.1532 -                or updating an existing record, otherwise. 
  1.1533 -              </div>
  1.1534 -            </li>
  1.1535 -            
  1.1536 -            <li>
  1.1537 -              Return the <var>key</var>.
  1.1538 -            </li>
  1.1539 -          </ol>        
  1.1540 -        </section>
  1.1541 -        
  1.1542 -        <section class="section">
  1.1543 -          <h4>Object Store Retrieval steps</h4>
  1.1544 -          <p>
  1.1545 -            The <dfn>steps for retrieving a record from an object store</dfn> are
  1.1546 -            as follows. These steps MUST be run with two parameters - the record 
  1.1547 -            key and the <a>object store</a>.
  1.1548 -          </p>
  1.1549 -            
  1.1550 -          <ol>
  1.1551 -            <li>
  1.1552 -              Let <var>key</var> be the key and <var>store</var> be the <a>object
  1.1553 -              store</a> passed to these steps.
  1.1554 -            </li>
  1.1555 -            <li>
  1.1556 -              If no record exists with key <var>key</var> in <var>store</var>,
  1.1557 -              then terminate these steps and set error code
  1.1558 -              <a class="idlType" href="#widl-IDBDatabaseException-NOT_FOUND_ERR"><code>NOT_FOUND_ERR</code></a>.
  1.1559 -            </li>
  1.1560 -            <li>
  1.1561 -              Return the a new <a>structured clone</a> of the value in the record with 
  1.1562 -              key <var>key</var> in <var>store</var>.
  1.1563 -            </li>
  1.1564 -          </ol>
  1.1565 -        </section>
  1.1566 -        
  1.1567 -        <section class="section">
  1.1568 -          <h4>Index Referenced Value Retrieval steps</h4>
  1.1569 -          <p>
  1.1570 -            The <dfn>steps for retrieving a record from an index</dfn> are
  1.1571 -            as follows. These steps MUST be run with two parameters - the record 
  1.1572 -            key and the <a>index</a>.
  1.1573 -          </p>
  1.1574 -            
  1.1575 -          <ol>
  1.1576 -            <li>
  1.1577 -              Let <var>key</var> be the key and <var>index</var> be the <a>index</a>
  1.1578 -              passed to these steps.
  1.1579 -            </li>
  1.1580 -            <li>
  1.1581 -              If no record exists with key <var>key</var> in <var>index</var>,
  1.1582 -              then terminate these steps and set error code
  1.1583 -              <a class="idlType" href="#widl-IDBDatabaseException-NOT_FOUND_ERR"><code>NOT_FOUND_ERR</code></a>.
  1.1584 -            </li>
  1.1585 -            <li>
  1.1586 -              Let <var>value</var> be the value of the record with key <var>key</var>
  1.1587 -              in <var>index</var>.
  1.1588 -            </li>
  1.1589 -            <li>
  1.1590 -              Return the value for the record with key <var>value</var> in 
  1.1591 -              <var>index</var>'s <a>referenced</a> <a>object store</a>.
  1.1592 -            </li>
  1.1593 -          </ol>
  1.1594 -        </section>
  1.1595 -        
  1.1596 -        <section class="section">
  1.1597 -          <h4>Index Value Retrieval steps</h4>
  1.1598 -          <p>
  1.1599 -            The <dfn>steps for retrieving a value from an index</dfn> are
  1.1600 -            as follows. These steps MUST be run with two parameters - the record 
  1.1601 -            key and the <a>index</a>.
  1.1602 -          </p>
  1.1603 -            
  1.1604 -          <ol>
  1.1605 -            <li>
  1.1606 -              Let <var>key</var> be the key and <var>index</var> be the <a>index</a>
  1.1607 -              passed to these steps.
  1.1608 -            </li>
  1.1609 -            <li>
  1.1610 -              If no record exists with key <var>key</var> in <var>index</var>,
  1.1611 -              then terminate these steps and set error code
  1.1612 -              <a class="idlType" href="#widl-IDBDatabaseException-NOT_FOUND_ERR"><code>NOT_FOUND_ERR</code></a>.
  1.1613 -            </li>
  1.1614 -            <li>
  1.1615 -              Return the value of the record with key <var>key</var>
  1.1616 -              in <var>index</var>.
  1.1617 -            </li>
  1.1618 -          </ol>
  1.1619 -        </section>
  1.1620 -        
  1.1621 -        <section class="section">
  1.1622 -          <h4>Object Store Deletion steps</h4>
  1.1623 -          <p>
  1.1624 -            The <dfn>steps for deleting a record from an object store</dfn> 
  1.1625 -            are as follows. These steps MUST be run with two parameters: the key
  1.1626 -            of the record to be deleted and the <a>object store</a>.
  1.1627 -          </p>
  1.1628 -          <ol>
  1.1629 -            <li>
  1.1630 -              Let <var>key</var> be the key and <var>store</var> be the <a>object
  1.1631 -              store</a> passed to these steps.
  1.1632 -            </li>
  1.1633 -            <li>
  1.1634 -              If no record exists with key <var>key</var> in <var>store</var>,
  1.1635 -              then terminate these steps and set error code
  1.1636 -              <a class="idlType" href="#widl-IDBDatabaseException-NOT_FOUND_ERR"><code>NOT_FOUND_ERR</code></a>.
  1.1637 -            </li>            
  1.1638 -            <li>
  1.1639 -               If any <a title="index">indexes</a> are <a>auto-populated</a> for
  1.1640 -               <var>store</var>, then remove the record in that index according to
  1.1641 -               <a>index maintenance conditions</a>.
  1.1642 -            </li>
  1.1643 -            
  1.1644 -            <li>
  1.1645 -              Remove the record from <var>store</var> with key <var>key</var>. 
  1.1646 -            </li>
  1.1647 -          </ol>
  1.1648 -        </section>
  1.1649 -        <section class="section">
  1.1650 -          <h4>Index Deletion steps</h4>
  1.1651 -          <p>
  1.1652 -            The <dfn>steps for deleting a record from an index</dfn> 
  1.1653 -            are as follows. These steps MUST be run with two parameters: the key
  1.1654 -            of the record to be deleted and the <a>index</a>.
  1.1655 -          </p>
  1.1656 -          <ol>
  1.1657 -            <li>
  1.1658 -              Let <var>key</var> be the key and <var>index</var> be the <a>index</a>
  1.1659 -              passed to these steps.
  1.1660 -            </li>
  1.1661 -            <li>
  1.1662 -              If no record exists with key <var>key</var> in <var>index</var>,
  1.1663 -              then terminate these steps and set error code
  1.1664 -              <a class="idlType" href="#widl-IDBDatabaseException-NOT_FOUND_ERR"><code>NOT_FOUND_ERR</code></a>.
  1.1665 -            </li>            
  1.1666 -            <li>
  1.1667 -              Remove the records from <var>index</var> with key <var>key</var>. 
  1.1668 -            </li>
  1.1669 -          </ol>
  1.1670 -        </section>
  1.1671 -        <section class="section">
  1.1672 -          <h4>Transaction Creation steps</h4>
  1.1673 -          <p>
  1.1674 -            When the user agent is to <dfn>create a <a>transaction</a></dfn>
  1.1675 -            it MUST run the following steps. These steps MUST be run with 
  1.1676 -            two parameters - <a>database</a> and an optional list of names of 
  1.1677 -            <a>database</a> <a>objects</a> to be reserved.
  1.1678 -          </p>
  1.1679 -          
  1.1680 -          <ol>
  1.1681 -            <li>
  1.1682 -              If the <a>database</a> passed to these steps has an <a>active</a>
  1.1683 -              <a>transaction</a>, then terminate these steps and set error code
  1.1684 -              <a class="idlType" href="#widl-IDBDatabaseException-NON_TRANSIENT_ERR"><code>NON_TRANSIENT_ERR</code></a>.
  1.1685 -            </li>
  1.1686 -            <li>
  1.1687 -              Pick the appropriate steps:
  1.1688 -              <dl class="switch">
  1.1689 -                <dt>If these steps are not called with a list of database objects</dt>
  1.1690 -                <dd>Acquire a lock on the entire database.</dd>
  1.1691 -                <dt>If these steps are called with a non-empty list of database objects</dt>
  1.1692 -                <dd><ol>
  1.1693 -                  <li>
  1.1694 -                    If any of the objects in this array is not a database object,
  1.1695 -                    then set <var>code</var> to <a class="idlType" href="#widl-IDBDatabaseException-NON_TRANSIENT_ERR"><code>NON_TRANSIENT_ERR</code></a>
  1.1696 -                    and jump to the last step.
  1.1697 -                  </li>
  1.1698 -                  <li>
  1.1699 -                    Acquire appropriate locks on each of the database objects and
  1.1700 -                    the objects they depend on in an ordered sequence. 
  1.1701 -                    <div class="note">
  1.1702 -                      If the database does not allow fine grained locking,
  1.1703 -                      then a user agent MAY obtain a shared or exclusive lock on the database.
  1.1704 -                    </div>
  1.1705 -                  </li>
  1.1706 -                </ol></dd>
  1.1707 -                <dt>If these steps are called with an empty array of database objects</dt>
  1.1708 +            </dd>
  1.1709 +          </dl>
  1.1710 +          <dl class="idl" title="[NoInterfaceObject] interface IDBTransactionRequest : IDBTransaction">
  1.1711 +            <dt>IDBObjectStoreRequest objectStore()</dt>
  1.1712 +            <dd>
  1.1713 +              Immediately returns the object store that has been already added 
  1.1714 +              to the <a>scope</a> of this <a>transaction</a>. 
  1.1715 +              <dl class="parameters">
  1.1716 +                <dt>DOMString name</dt>
  1.1717 +                <dd>The requested <a>object store</a></dd>
  1.1718 +              </dl>
  1.1719 +              <dl class="exception" title="IDBDatabaseException">
  1.1720 +                <dt><a class="idlType" href="#widl-IDBDatabaseException-NOT_FOUND_ERR"><code>NOT_FOUND_ERR</code></a></dt>
  1.1721                  <dd>
  1.1722 -                    Do not acquire locks on any database objects now. Locks are obtained as
  1.1723 -                    the application attempts to access those objects.
  1.1724 -                    <div class="note">
  1.1725 -                      Using the database in this style MAY lead to deadlocks. Programmers
  1.1726 -                      MUST use caution to acquire and release database objects in the same
  1.1727 -                      global order to avoid deadlocks.
  1.1728 -                    </div>
  1.1729 +                If the requested <a>object store</a> is not in this 
  1.1730 +                <a>transaction</a>'s <a>scope</a>.
  1.1731                  </dd>
  1.1732                </dl>
  1.1733 -            </li>
  1.1734 +            </dd>
  1.1735 +            <dt>void abort()</dt>
  1.1736 +            <dd>
  1.1737 +              This method returns immediately and undoes all the changes performed to 
  1.1738 +              the <a>objects</a> of this <a>database</a> in this <a>transaction</a>. If this <a>transaction</a> has already been committed
  1.1739 +              or aborted,  then an
  1.1740 +              <a title="event-error">error event</a> is fired on this method's
  1.1741 +              returned object with its 
  1.1742 +              <a class="idlType" href="#widl-IDBErrorEvent-code"><code>code</code></a> set to
  1.1743 +              <a class="idlType" href="#widl-IDBDatabaseException-NON_TRANSIENT_ERR"><code>NON_TRANSIENT_ERR</code></a>
  1.1744 +              and a suitable 
  1.1745 +              <a class="idlType" href="#widl-IDBErrorEvent-message"><code>message</code></a>.
  1.1746 +            </dd>
  1.1747 +            <dt>void commit()</dt>
  1.1748 +            <dd>
  1.1749 +              This method returns immediately and durably stores all the changes 
  1.1750 +              made to the <a>objects</a> of this <a>database</a> since the 
  1.1751 +              creation of this <a>transaction</a>. If this <a>transaction</a> 
  1.1752 +              has already been committed or aborted,  then an
  1.1753 +              <a title="event-error">error event</a> is fired on this method's
  1.1754 +              returned object with its 
  1.1755 +              <a class="idlType" href="#widl-IDBErrorEvent-code"><code>code</code></a> set to
  1.1756 +              <a class="idlType" href="#widl-IDBDatabaseException-NON_TRANSIENT_ERR"><code>NON_TRANSIENT_ERR</code></a>
  1.1757 +              and a suitable 
  1.1758 +              <a class="idlType" href="#widl-IDBErrorEvent-message"><code>message</code></a>.
  1.1759 +              If this <a>transaction</a>'s <a>scope</a> is <a>dynamic</a>, and
  1.1760 +              the user agent cannot commit all the changes due to conflicts with 
  1.1761 +              another <a>transaction</a>, then an
  1.1762 +              <a title="event-error">error event</a> is fired on this method's
  1.1763 +              returned object with its 
  1.1764 +              <a class="idlType" href="#widl-IDBErrorEvent-code"><code>code</code></a> set to
  1.1765 +              <a class="idlType" href="#widl-IDBDatabaseException-RECOVERABLE_ERR"><code>RECOVERABLE_ERR</code></a>
  1.1766 +              and a suitable 
  1.1767 +              <a class="idlType" href="#widl-IDBErrorEvent-message"><code>message</code></a>.
  1.1768 +            </dd>
  1.1769 +            <dt>attribute Function onabort</dt>
  1.1770 +            <dt>attribute Function oncomplete</dt>
  1.1771 +            <dt>attribute Function ontimeout</dt>
  1.1772 +          </dl>
  1.1773 +          <p class="idl" title="IDBTransactionRequest implements EventTarget">
  1.1774 +        </section>
  1.1775 +                  
  1.1776 +      </section>            
  1.1777 +    </section> <!-- API -->      
  1.1778  
  1.1779 -            <li>
  1.1780 -              If a timeout duration is passed to these steps and is exceeded when 
  1.1781 -              acquiring locks, then set <var>code</var> to 
  1.1782 -              <a class="idlType" href="#widl-IDBDatabaseException-TIMEOUT_ERR"><code>TIMEOUT_ERR</code></a> and jump to the last step.
  1.1783 -            </li>
  1.1784 -
  1.1785 -            <li>
  1.1786 -              Open a new transaction to the database, and create a
  1.1787 -              <code><a>IDBTransaction</a></code> object
  1.1788 -              that represents that transaction. Let <var>transaction</var> be this object.
  1.1789 -            </li>
  1.1790 -            
  1.1791 -            <li>
  1.1792 -              Set the current transaction of this <a><code>IDBDatabase</code></a> object
  1.1793 -              to <var>transaction</var>.
  1.1794 -            </li>
  1.1795 -            <li>
  1.1796 -              Return <var>transaction</var>. End these steps.
  1.1797 -            </li>
  1.1798 -            <li>
  1.1799 -              This step is only performed in case of error. If this step is performed
  1.1800 -              synchronously, then raise a newly constructed 
  1.1801 -              <a><code>IDBDatabaseException</code></a> 
  1.1802 -              exception <var>exception</var> with the code <var>code</var>.
  1.1803 -            </li>
  1.1804 -          </ol>        
  1.1805 -        </section>
  1.1806 -      </section>
  1.1807        <section id="sync-database" class="section">
  1.1808          <h3>Synchronous APIs</h3>
  1.1809          <section id="opening-sync" class="section">
  1.1810 @@ -1147,7 +1787,7 @@
  1.1811            </p>
  1.1812            
  1.1813            <dl class="idl" title="[NoInterfaceObject] interface IDBEnvironmentSync">
  1.1814 -            <dt>readonly attribute IDBFactory indexedDB</dt>
  1.1815 +            <dt>readonly attribute IDBFactory indexedDBSync</dt>
  1.1816              <dd>This attribute provides applications a mechanism for accessing
  1.1817                capabilities of indexed databases.</dd>
  1.1818            </dl>
  1.1819 @@ -1160,8 +1800,6 @@
  1.1820                  <dd>The <a title="database name">name</a> for the <a>database</a></dd>
  1.1821                  <dt>DOMString description</dt>
  1.1822                  <dd>The description for the <a>database</a></dd>
  1.1823 -                <dt>optional boolean modifyDatabase</dt>
  1.1824 -                <dd>This defaults to true</dd>
  1.1825                </dl>
  1.1826                <dl class="exception" title="IDBDatabaseException">
  1.1827                  <dt>UNKNOWN_ERR</dt>
  1.1828 @@ -1855,6 +2493,22 @@
  1.1829              to reserve the required <a>database</a> <a>objects</a>.
  1.1830            </p>
  1.1831            <dl class="idl" title="[NoInterfaceObject] interface IDBTransactionSync : IDBTransaction">
  1.1832 +            <dt>IDBObjectStoreSync objectStore()</dt>
  1.1833 +            <dd>
  1.1834 +              Immediately returns the object store that has been already added 
  1.1835 +              to the <a>scope</a> of this <a>transaction</a>. 
  1.1836 +              <dl class="parameters">
  1.1837 +                <dt>DOMString name</dt>
  1.1838 +                <dd>The requested <a>object store</a></dd>
  1.1839 +              </dl>
  1.1840 +              <dl class="exception" title="IDBDatabaseException">
  1.1841 +                <dt><a class="idlType" href="#widl-IDBDatabaseException-NOT_FOUND_ERR"><code>NOT_FOUND_ERR</code></a></dt>
  1.1842 +                <dd>
  1.1843 +                If the requested <a>object store</a> is not in this 
  1.1844 +                <a>transaction</a>'s <a>scope</a>.
  1.1845 +                </dd>
  1.1846 +              </dl>
  1.1847 +            </dd>
  1.1848              <dt>void abort()</dt>
  1.1849              <dd>
  1.1850                This method signals the need to cancel the effects of
  1.1851 @@ -1959,854 +2613,359 @@
  1.1852            </dl>  
  1.1853          </section>     
  1.1854        </section>
  1.1855 -      <section class="section" id="async-api"> 
  1.1856 -        <h3>Asynchronous APIs</h3>
  1.1857 -        <p>
  1.1858 -          The asynchronous API returns without blocking the calling thread.
  1.1859 -          Asynchronous APIs are essentially the same as the synchronous ones 
  1.1860 -          except that the result of an operation is not available when the 
  1.1861 -          operation returns.
  1.1862 -        </p>
  1.1863 -        <section class="section" id="events">
  1.1864 -          <h4>Event interfaces</h4>
  1.1865 +      <section class="section" id="algorithms">
  1.1866 +        <h3>Algorithms</h3>
  1.1867 +        <section class="section" id="opening">
  1.1868 +          <h4>Opening the database</h4>
  1.1869            <p>
  1.1870 -            Events are fired during asynchronous access as <a>database</a> 
  1.1871 -            <a>objects</a> are created and data is consumed from these objects. 
  1.1872 -            As requests are made to <a>database</a> <a>objects</a>, the user 
  1.1873 -            agent loads information about them into memory and when the required
  1.1874 -            object handle is available, it alerts the application through the
  1.1875 -            firing of events. The events are as follows:
  1.1876 +            The <dfn>steps for opening a database</dfn> are as follows. These 
  1.1877 +            steps MUST be run with an origin, a database name and an optional
  1.1878 +            description. All the steps MUST be run atomically:
  1.1879            </p>
  1.1880 -          <dl class="idl" title="[NoInterfaceObject] interface IDBEvent"> 
  1.1881 -            <dt>readonly attribute any source</dt>
  1.1882 -            <dd>Returns the asynchronous request object that fired this event.</dd>
  1.1883 -          </dl>
  1.1884 -          <dl class="idl" title="[NoInterfaceObject] interface IDBSuccessEvent : IDBEvent"> 
  1.1885 -            <dt>readonly attribute any result</dt>
  1.1886 -            <dd>Returns the result of the successful completion of an asynchronous request
  1.1887 -            on the <a class="idlType" href="#widl-IDBEvent-source"><code>source</code></a>.</dd>
  1.1888 -          </dl>
  1.1889 -          <dl class="idl" title="[NoInterfaceObject] interface IDBErrorEvent : IDBEvent"> 
  1.1890 -            <dt>readonly attribute unsigned short code</dt>
  1.1891 -            <dd>Returns the most appropriate error code from carrying out the asynchronous request
  1.1892 -            on the <a class="idlType" href="#widl-IDBEvent-source"><code>source</code></a>. The 
  1.1893 -            valid values of this error code are defined on the exception
  1.1894 -            <a class="idlType" href="#widl-IDBDatabaseException"><code>IDBDatabaseException</code></a>.</dd>
  1.1895 -            <dt>readonly attribute DOMString message</dt>
  1.1896 -            <dd>Returns the describing the reason for the error. The message should be localized 
  1.1897 -            to the user's language.</dd>
  1.1898 -          </dl>
  1.1899 +          
  1.1900 +          <ol>
  1.1901 +            <li>
  1.1902 +              If there is already a database with the given name from the origin
  1.1903 +              <var>origin</var>, then let <var>db</var> be that database. If a description is passed to these steps, set the description of <var>db</var> to that.
  1.1904 +            </li>
  1.1905 +            
  1.1906 +            <li>
  1.1907 +              If no database with the given name from the origin <var>origin</var>
  1.1908 +              exists, then create the database <var>db</var> with the name and
  1.1909 +              description passed to these steps.
  1.1910 +            </li>
  1.1911 +  
  1.1912 +            <li>
  1.1913 +              Create a <a>connection</a> to <var>db</var> and call it <var>result</var>.
  1.1914 +            </li>
  1.1915 +            
  1.1916 +            <li>
  1.1917 +              Return <var>result</var>.
  1.1918 +            </li>
  1.1919 +          </ol>        
  1.1920          </section>
  1.1921          
  1.1922 -        <section class="section" id="request-api">
  1.1923 -          <h4>The <code>IDBRequest</code> Interface</h4>
  1.1924 +        <section class="section">
  1.1925 +          <h4>Object Store Storage steps</h4>
  1.1926            <p>
  1.1927 -            The <a><code>IDBRequest</code></a> interface provides means to access results of  
  1.1928 -            asynchronous requests to <a title="database">databases</a> and <a>database</a> 
  1.1929 -            <a>objects</a> using <a>event handler attributes</a> [[!DOM-LEVEL-3-EVENTS]]. 
  1.1930 +            The <dfn>steps for storing a record into an object store</dfn> are as follows. 
  1.1931 +            These steps MUST be run with four parameters: the <a>object store</a>,
  1.1932 +            a value, an optional key, and an optional no-overwrite flag.
  1.1933            </p>
  1.1934 -          <div class="example">       
  1.1935 -            <p>
  1.1936 -              In the following example, we open a <a>database</a> asynchronously. Various 
  1.1937 -              event handlers are registered for responding to various situations.
  1.1938 -            </p>
  1.1939 -            <codeblock>indexedDB.request.<a>onsuccess</a> = function(evt) {...};
  1.1940 -indexedDB.request.<a>onerror</a> = function(evt) {...};
  1.1941 -indexedDB.<a>open</a>('AddressBook', 'Address Book');</codeblock>
  1.1942 -          </div>
  1.1943 -          <dl class="idl" title="[NoInterfaceObject] interface IDBRequest : EventTarget"> 
  1.1944 -            <dt>void abort()</dt>
  1.1945 -            <dd>This method has no effect if the 
  1.1946 -            <a class="idlType" href="#widl-IDBRequest-readyState"><code>readyState</code></a>
  1.1947 -            is <a class="idlType" href="#widl-IDBRequest-DONE"><code>DONE</code></a>.
  1.1948 -            If made on a read request, the implementation discontinues the in-flight request 
  1.1949 -            even if the implementation has already read the data, and is ready to fire a
  1.1950 -            <a title="event-success">success event</a>. The <a title="event-error">error event</a> 
  1.1951 -            is always fired if <a class="idlType" href="#widl-IDBRequest-abort"><code>abort()</code></a> 
  1.1952 -            is called, and the <a title="event-success">success event</a> is suppressed.
  1.1953 -            The <a class="idlType" href="#widl-IDBRequest-readyState"><code>readyState</code></a>
  1.1954 -            moves to <a class="idlType" href="#widl-IDBRequest-DONE"><code>DONE</code></a>.
  1.1955 -            If the request aborts successfully, the
  1.1956 -            <a class="idlType" href="#widl-IDBRequest-error"><code>error</code></a> is set
  1.1957 -            to <a class="idlType" href="#widl-IDBDatabaseException-UNKNOWN_ERR"><code>UNKNOWN_ERR</code></a>.</dd>
  1.1958 -            <dt>const     unsigned short INITIAL = 0</dt>
  1.1959 -            <dd>This state indicates that a request has not been started.</dd>
  1.1960 -            <dt>const     unsigned short LOADING = 1</dt>
  1.1961 -            <dd>This state indicates that a request has been started but its results is not
  1.1962 -            yet available.</dd>
  1.1963 -            <dt>const     unsigned short DONE = 2</dt>
  1.1964 -            <dd>This state indicates that a result to a previous request is available in
  1.1965 -            the <a class="idlType" href="#widl-IDBRequest-result"><code>result</code></a> attribute.</dd>
  1.1966 -            <dt>readonly attribute unsigned short readyState</dt>
  1.1967 -            <dd>Every request starts in the 
  1.1968 -            <a class="idlType" href="#widl-IDBRequest-INITIAL"><code>INITIAL</code></a> state.
  1.1969 -            As soon as the implementation starts executing the request, its state changes to
  1.1970 -            <a class="idlType" href="#widl-IDBRequest-LOADING"><code>LOADING</code></a>. When either
  1.1971 -            the request completes, fails or aborts successfully, the state changes to 
  1.1972 -            <a class="idlType" href="#widl-IDBRequest-DONE"><code>DONE</code></a>.</dd>
  1.1973 -            <dt>attribute Function onsuccess</dt>
  1.1974 -            <dd>The event handler for the <a title="event-success">success event</a></dd>
  1.1975 -            <dt>attribute Function onerror</dt>
  1.1976 -            <dd>The event handler for the <a title="event-error">error event</a></dd>
  1.1977 -          </dl>
  1.1978 +          <ol>
  1.1979 +            <li>
  1.1980 +              Let <var>store</var> be the <a>object store</a>, <var>key</var> be
  1.1981 +              the key and <var>value</var> be the value passed to these steps.
  1.1982 +            </li>
  1.1983 +            <li>
  1.1984 +              If <var>store</var> uses <a>out-of-line keys</a> but no <a>key 
  1.1985 +              generator</a>, then a key MUST be passed to these steps. If not, 
  1.1986 +              terminate these steps and set error code <a class="idlType" href="#widl-IDBDatabaseException-DATA_ERR"><code>DATA_ERR</code></a>.
  1.1987 +            </li>
  1.1988 +            <li>
  1.1989 +              If <var>store</var> uses <a>in-line keys</a>, then 
  1.1990 +              let <var>key</var> be the property of <var>object</var> at  
  1.1991 +              <var>store</var>'s <a title="object store key path">key path</a>.
  1.1992 +            </li>
  1.1993 +           <li>
  1.1994 +              Produce a <a>structured clone</a> of <var>value</var> and call it
  1.1995 +              <var>object</var>.
  1.1996 +            </li>
  1.1997 +            <li>
  1.1998 +              If <var>key</var> is not defined or null, then perform the 
  1.1999 +              following steps.
  1.2000 +              <ol>
  1.2001 +                <li>
  1.2002 +                  If <var>store</var> does not have a <a>key generator</a>, then 
  1.2003 +                  terminate these steps and set error code <a class="idlType" href="#widl-IDBDatabaseException-NOT_ALLOWED_ERR"><code>NOT_ALLOWED_ERR</code></a>.
  1.2004 +                </li>
  1.2005 +                <li>
  1.2006 +                  Using <var>store</var>'s <a>key generator</a>, produce the 
  1.2007 +                  next key and store it as <var>key</var>.
  1.2008 +                </li>
  1.2009 +                <li>
  1.2010 +                  If <var>store</var> uses <a>in-line keys</a>, then store 
  1.2011 +                  <var>key</var> as the property value for <var>object</var> at  
  1.2012 +                  <var>store</var>'s <a title="object store key path">key path</a>.
  1.2013 +                </li>
  1.2014 +              </ol>
  1.2015 +            </li>
  1.2016 +            <li>
  1.2017 +              If the no-overwrite flag was passed to these steps and is set, and 
  1.2018 +              a record already exists with its key being <var>key</var>, then 
  1.2019 +              terminate these steps and set error code <a class="idlType" href="#widl-IDBDatabaseException-CONSTRAINT_ERR"><code>CONSTRAINT_ERR</code></a>.
  1.2020 +            </li>
  1.2021 +            <li>
  1.2022 +              <p>
  1.2023 +                Store a record in <var>store</var> containing <var>key</var> as its key  
  1.2024 +                and <var>object</var> as its value. If any <a title="index">indexes</a>  
  1.2025 +                are <a>auto-populated</a> for <var>store</var>, then store a record
  1.2026 +                in that index according to <a>index maintenance conditions</a>.
  1.2027 +              </p>
  1.2028 +              <div class="note">
  1.2029 +                Storing would mean inserting if no record exists for that key
  1.2030 +                or updating an existing record, otherwise. <a title="auto-populated">
  1.2031 +                Auto populated<a> <a>index</a> record will also be respectively
  1.2032 +                inserted or updated depending on what storing results in.
  1.2033 +              </div>
  1.2034 +            </li>
  1.2035 +            
  1.2036 +            <li>
  1.2037 +              Return the <var>key</var>.
  1.2038 +            </li>
  1.2039 +          </ol>
  1.2040 +        </section>
  1.2041 +        
  1.2042 +        <section class="section">
  1.2043 +          <h4>Index Storage steps</h4>
  1.2044            <p>
  1.2045 -            When a request is made, the 
  1.2046 -            <a class="idlType" href="#widl-IDBRequest-readyState"><code>readyState</code></a> changes to 
  1.2047 -            <a class="idlType" href="#widl-IDBRequest-LOADING"><code>LOADING</code></a>. 
  1.2048 -            If a request completes successfully, the
  1.2049 -            <a class="idlType" href="#widl-IDBRequest-readyState"><code>readyState</code></a>
  1.2050 -            changes to <a class="idlType" href="#widl-IDBRequest-DONE"><code>DONE</code></a>, 
  1.2051 -            the result of the request is included as the 
  1.2052 -            <a class="idlType" href="#widl-IDBSuccessEvent-result"><code>result</code></a> of
  1.2053 -            a new <a class="idlType" href="#widl-IDBSuccessEvent"><code>IDBSuccessEvent</code></a> 
  1.2054 -            event, and <a>queue a task</a> to fire that event with the name <code>success</code>, 
  1.2055 -            with no namespace, which does not bubble, is not cancelable at each 
  1.2056 -            <a class="externalDFN"><code>Window</code></a> object.
  1.2057 +            The <dfn>steps for storing a record into an index</dfn> are as follows. 
  1.2058 +            These steps MUST be run with four parameters: the <a>index</a>,
  1.2059 +            a key, a value, and a no-overwrite flag.
  1.2060            </p>
  1.2061 +          <ol>
  1.2062 +            <li>
  1.2063 +              Let <var>index</var> be the <a>index</a>, <var>key</var> be
  1.2064 +              the key and <var>value</var> be the value passed to these steps.
  1.2065 +            </li>
  1.2066 +            <li>
  1.2067 +              If <var>index</var> has a <a title="index key path">key path</a>,
  1.2068 +              then terminate these steps and set error code <a class="idlType" href="#widl-IDBDatabaseException-CONSTRAINT_ERR"><code>CONSTRAINT_ERR</code></a>.
  1.2069 +            </li>
  1.2070 +            <li>
  1.2071 +              If the no-overwrite flag was passed to these steps and is set, and 
  1.2072 +              a record already exists in <var>index</var> with its key being 
  1.2073 +              <var>key</var>, then terminate these steps and set error code 
  1.2074 +              <a class="idlType" href="#widl-IDBDatabaseException-CONSTRAINT_ERR"><code>CONSTRAINT_ERR</code></a>.
  1.2075 +            </li>
  1.2076 +            <li>
  1.2077 +              If no record exists in <var>index</var>'s <a>referenced</a>
  1.2078 +              <a>object store</a> whose key is <var>value</var>, then terminate
  1.2079 +              these steps and set error code <a class="idlType" href="#widl-IDBDatabaseException-CONSTRAINT_ERR"><code>CONSTRAINT_ERR</code></a>.
  1.2080 +            </li>
  1.2081 +            <li>
  1.2082 +              <p>
  1.2083 +                Store a record in <var>index</var> containing <var>key</var> as its key  
  1.2084 +                and <var>value</var> as its value. 
  1.2085 +              </p>
  1.2086 +              <div class="note">
  1.2087 +                Storing would mean inserting if no record exists for that key
  1.2088 +                or updating an existing record, otherwise. 
  1.2089 +              </div>
  1.2090 +            </li>
  1.2091 +            
  1.2092 +            <li>
  1.2093 +              Return the <var>key</var>.
  1.2094 +            </li>
  1.2095 +          </ol>        
  1.2096 +        </section>
  1.2097 +        
  1.2098 +        <section class="section">
  1.2099 +          <h4>Object Store Retrieval steps</h4>
  1.2100            <p>
  1.2101 -            If an error occurs while performing the operation, the 
  1.2102 -            <a class="idlType" href="#widl-IDBRequest-readyState"><code>readyState</code></a>
  1.2103 -            changes to <a class="idlType" href="#widl-IDBRequest-DONE"><code>DONE</code></a>, 
  1.2104 -            the error code and message are included in a new <a><code>IDBDatabaseError</code></a>
  1.2105 -            event, and <a>queue a task</a> to fire that event with the name 
  1.2106 -            <code>error</code>, with no namespace, which does not bubble, is 
  1.2107 -            not cancelable at each <a class="externalDFN"><code>Window</code></a> object.
  1.2108 +            The <dfn>steps for retrieving a record from an object store</dfn> are
  1.2109 +            as follows. These steps MUST be run with two parameters - the record 
  1.2110 +            key and the <a>object store</a>.
  1.2111            </p>
  1.2112 -           
  1.2113 +            
  1.2114 +          <ol>
  1.2115 +            <li>
  1.2116 +              Let <var>key</var> be the key and <var>store</var> be the <a>object
  1.2117 +              store</a> passed to these steps.
  1.2118 +            </li>
  1.2119 +            <li>
  1.2120 +              If no record exists with key <var>key</var> in <var>store</var>,
  1.2121 +              then terminate these steps and set error code
  1.2122 +              <a class="idlType" href="#widl-IDBDatabaseException-NOT_FOUND_ERR"><code>NOT_FOUND_ERR</code></a>.
  1.2123 +            </li>
  1.2124 +            <li>
  1.2125 +              Return the a new <a>structured clone</a> of the value in the record with 
  1.2126 +              key <var>key</var> in <var>store</var>.
  1.2127 +            </li>
  1.2128 +          </ol>
  1.2129 +        </section>
  1.2130 +        
  1.2131 +        <section class="section">
  1.2132 +          <h4>Index Referenced Value Retrieval steps</h4>
  1.2133            <p>
  1.2134 -            The <span>task source</span> for these tasks is the 
  1.2135 -            <dfn id="database-access-task-source">database access task source</dfn>.
  1.2136 -          </p>    
  1.2137 +            The <dfn>steps for retrieving a record from an index</dfn> are
  1.2138 +            as follows. These steps MUST be run with two parameters - the record 
  1.2139 +            key and the <a>index</a>.
  1.2140 +          </p>
  1.2141 +            
  1.2142 +          <ol>
  1.2143 +            <li>
  1.2144 +              Let <var>key</var> be the key and <var>index</var> be the <a>index</a>
  1.2145 +              passed to these steps.
  1.2146 +            </li>
  1.2147 +            <li>
  1.2148 +              If no record exists with key <var>key</var> in <var>index</var>,
  1.2149 +              then terminate these steps and set error code
  1.2150 +              <a class="idlType" href="#widl-IDBDatabaseException-NOT_FOUND_ERR"><code>NOT_FOUND_ERR</code></a>.
  1.2151 +            </li>
  1.2152 +            <li>
  1.2153 +              Let <var>value</var> be the value of the record with key <var>key</var>
  1.2154 +              in <var>index</var>.
  1.2155 +            </li>
  1.2156 +            <li>
  1.2157 +              Return the value for the record with key <var>value</var> in 
  1.2158 +              <var>index</var>'s <a>referenced</a> <a>object store</a>.
  1.2159 +            </li>
  1.2160 +          </ol>
  1.2161 +        </section>
  1.2162 +        
  1.2163 +        <section class="section">
  1.2164 +          <h4>Index Value Retrieval steps</h4>
  1.2165            <p>
  1.2166 -            The following are the <span>event handlers</span> (and their corresponding 
  1.2167 -            <span>event handler event types</span>) that MUST be supported, as IDL
  1.2168 -            attributes, by objects implementing the <a><code>IDBRequest</code></a> interface:
  1.2169 +            The <dfn>steps for retrieving a value from an index</dfn> are
  1.2170 +            as follows. These steps MUST be run with two parameters - the record 
  1.2171 +            key and the <a>index</a>.
  1.2172 +          </p>
  1.2173 +            
  1.2174 +          <ol>
  1.2175 +            <li>
  1.2176 +              Let <var>key</var> be the key and <var>index</var> be the <a>index</a>
  1.2177 +              passed to these steps.
  1.2178 +            </li>
  1.2179 +            <li>
  1.2180 +              If no record exists with key <var>key</var> in <var>index</var>,
  1.2181 +              then terminate these steps and set error code
  1.2182 +              <a class="idlType" href="#widl-IDBDatabaseException-NOT_FOUND_ERR"><code>NOT_FOUND_ERR</code></a>.
  1.2183 +            </li>
  1.2184 +            <li>
  1.2185 +              Return the value of the record with key <var>key</var>
  1.2186 +              in <var>index</var>.
  1.2187 +            </li>
  1.2188 +          </ol>
  1.2189 +        </section>
  1.2190 +        
  1.2191 +        <section class="section">
  1.2192 +          <h4>Object Store Deletion steps</h4>
  1.2193 +          <p>
  1.2194 +            The <dfn>steps for deleting a record from an object store</dfn> 
  1.2195 +            are as follows. These steps MUST be run with two parameters: the key
  1.2196 +            of the record to be deleted and the <a>object store</a>.
  1.2197 +          </p>
  1.2198 +          <ol>
  1.2199 +            <li>
  1.2200 +              Let <var>key</var> be the key and <var>store</var> be the <a>object
  1.2201 +              store</a> passed to these steps.
  1.2202 +            </li>
  1.2203 +            <li>
  1.2204 +              If no record exists with key <var>key</var> in <var>store</var>,
  1.2205 +              then terminate these steps and set error code
  1.2206 +              <a class="idlType" href="#widl-IDBDatabaseException-NOT_FOUND_ERR"><code>NOT_FOUND_ERR</code></a>.
  1.2207 +            </li>            
  1.2208 +            <li>
  1.2209 +               If any <a title="index">indexes</a> are <a>auto-populated</a> for
  1.2210 +               <var>store</var>, then remove the record in that index according 
  1.2211 +               to <a>index maintenance conditions</a>.
  1.2212 +            </li>
  1.2213 +            
  1.2214 +            <li>
  1.2215 +              Remove the record from <var>store</var> with key <var>key</var>. 
  1.2216 +            </li>
  1.2217 +          </ol>
  1.2218 +        </section>
  1.2219 +        <section class="section">
  1.2220 +          <h4>Index Deletion steps</h4>
  1.2221 +          <p>
  1.2222 +            The <dfn>steps for deleting a record from an index</dfn> 
  1.2223 +            are as follows. These steps MUST be run with two parameters: the key
  1.2224 +            of the record to be deleted and the <a>index</a>.
  1.2225 +          </p>
  1.2226 +          <ol>
  1.2227 +            <li>
  1.2228 +              Let <var>key</var> be the key and <var>index</var> be the <a>index</a>
  1.2229 +              passed to these steps.
  1.2230 +            </li>
  1.2231 +            <li>
  1.2232 +              If no record exists with key <var>key</var> in <var>index</var>,
  1.2233 +              then terminate these steps and set error code
  1.2234 +              <a class="idlType" href="#widl-IDBDatabaseException-NOT_FOUND_ERR"><code>NOT_FOUND_ERR</code></a>.
  1.2235 +            </li>            
  1.2236 +            <li>
  1.2237 +              Remove the records from <var>index</var> with key <var>key</var>. 
  1.2238 +            </li>
  1.2239 +          </ol>
  1.2240 +        </section>
  1.2241 +        <section class="section">
  1.2242 +          <h4>Transaction Creation steps</h4>
  1.2243 +          <p>
  1.2244 +            When the user agent is to <dfn>create a <a>transaction</a></dfn>
  1.2245 +            it MUST run the following steps. These steps MUST be run with 
  1.2246 +            two parameters - <a>database</a>, an optional global flag, and an 
  1.2247 +            optional list of names of <a>database</a> <a>objects</a> to be 
  1.2248 +            reserved.
  1.2249            </p>
  1.2250            
  1.2251 -          <table>
  1.2252 -            <thead><tr>
  1.2253 -              <th><span>Event handler</span> </th>
  1.2254 -              <th><span>Event handler event type</span></th>
  1.2255 -            </tr></thead>
  1.2256 -            <tbody>
  1.2257 -              <tr>
  1.2258 -                <td><dfn id="handler-request-onsuccess"><code>onsuccess</code></dfn> </td>
  1.2259 -                <td> <code><dfn title="event-success">success</dfn></td>
  1.2260 -              </tr>
  1.2261 -              <tr>
  1.2262 -                <td><dfn id="handler-request-onerror"><code>onerror</code></dfn> </td>
  1.2263 -                <td> <code><dfn title="event-error">error</dfn></code></td>
  1.2264 -              </tr>
  1.2265 -            </tbody>
  1.2266 -          </table>        
  1.2267 +          <ol>
  1.2268 +            <li>
  1.2269 +              If the global flag passed to these steps is set, and the 
  1.2270 +              <a>database</a> passed to these steps has an <a>active</a>
  1.2271 +              <a>transaction</a>, then terminate these steps and set error code
  1.2272 +              <a class="idlType" href="#widl-IDBDatabaseException-NON_TRANSIENT_ERR"><code>NON_TRANSIENT_ERR</code></a>.
  1.2273 +            </li>
  1.2274 +            <li>
  1.2275 +              Pick the appropriate steps:
  1.2276 +              <dl class="switch">
  1.2277 +                <dt>If these steps are called with the global flag set</dt>
  1.2278 +                <dd>Acquire a lock on the entire database.</dd>
  1.2279 +                <dt>If these steps are called with a non-empty list of <a>object store</a> <a title="object store name">name</a>s</dt>
  1.2280 +                <dd>
  1.2281 +                    Acquire appropriate locks on each of the named 
  1.2282 +                    <a>object store</a> in an ordered sequence. 
  1.2283 +                    <div class="note">
  1.2284 +                      A user agent MAY obtain a shared or exclusive lock on 
  1.2285 +                      the database if it does not perform fine grained locking.
  1.2286 +                    </div>
  1.2287 +                </dd>
  1.2288 +                <dt>If these steps are called with an empty list of <a>object store</a> <a title="object store name">name</a>s</dt>
  1.2289 +                <dd>
  1.2290 +                    Do not acquire locks on any database objects now. Locks are 
  1.2291 +                    obtained as the application attempts to access those 
  1.2292 +                    objects.
  1.2293 +                    <div class="note">
  1.2294 +                      Using the database in this style MAY lead to deadlocks. Programmers are advised to use caution to acquire and 
  1.2295 +                      release object stores in the same global order to avoid 
  1.2296 +                      deadlocks.
  1.2297 +                    </div>
  1.2298 +                </dd>
  1.2299 +              </dl>
  1.2300 +            </li>
  1.2301 +
  1.2302 +            <li>
  1.2303 +              If a timeout duration is passed to these steps and is exceeded 
  1.2304 +              when acquiring locks, then set <var>code</var> to 
  1.2305 +              <a class="idlType" href="#widl-IDBDatabaseException-TIMEOUT_ERR"><code>TIMEOUT_ERR</code></a> and jump to the last step.
  1.2306 +            </li>
  1.2307 +
  1.2308 +            <li>
  1.2309 +              Open a new transaction to the database, and create a
  1.2310 +              <code><a>IDBTransaction</a></code> object
  1.2311 +              that represents that transaction. Let <var>transaction</var> be 
  1.2312 +              this object.
  1.2313 +            </li>
  1.2314 +            
  1.2315 +            <li>
  1.2316 +              Set the current transaction of this <a><code>IDBDatabase</code></a> object
  1.2317 +              to <var>transaction</var>.
  1.2318 +            </li>
  1.2319 +            <li>
  1.2320 +              Return <var>transaction</var>. End these steps.
  1.2321 +            </li>
  1.2322 +            <li>
  1.2323 +              This step is only performed in case of error. If this step is performed
  1.2324 +              synchronously, then raise a newly constructed 
  1.2325 +              <a><code>IDBDatabaseException</code></a> 
  1.2326 +              exception <var>exception</var> with the code <var>code</var>.
  1.2327 +            </li>
  1.2328 +          </ol>        
  1.2329          </section>
  1.2330 -        
  1.2331 -        <section class="section" id="requests">
  1.2332 -          <h4>Asynchronous Request API</h4>
  1.2333 -         <p>
  1.2334 -            <a title="Window"><a class="externalDFN"><code>Window</code></a> objects MUST implement the 
  1.2335 -            <a><code>IDBEnvironment</code></a> interface.
  1.2336 -          </p>
  1.2337 -          <p class="idl" title="Window implements IDBEnvironment">
  1.2338 -          </p>
  1.2339 -          
  1.2340 -          <dl class="idl" title="[NoInterfaceObject] interface IDBEnvironment">
  1.2341 -            <dt>readonly attribute IDBFactoryRequest indexedDB</dt>
  1.2342 -            <dd>This attribute provides applications a mechanism for accessing
  1.2343 -              capabilities of indexed databases.</dd>
  1.2344 -          </dl>
  1.2345 -          <p>
  1.2346 -            Every method for making asynchronous requests returns an 
  1.2347 -            <a><code>IDBRequest</code></a> object that communicates back to the requesting
  1.2348 -            application through events.
  1.2349 -            This design means that any number of requests can be active on any <a>database</a>
  1.2350 -            or <a title="objects">object</a> handle at a time. 
  1.2351 -          </p>
  1.2352 -          <dl class="idl" title="[NoInterfaceObject] interface IDBFactoryRequest">
  1.2353 -            <dt>IDBRequest open()</dt>
  1.2354 -            <dd>
  1.2355 -              <p>
  1.2356 -                This method returns immediately and runs the
  1.2357 -                following steps in a different thread.
  1.2358 -                If an error occurs while the <a>database</a> <a>connection</a> 
  1.2359 -                is being opened, then an
  1.2360 -                <a title="event-error">error event</a> is fired on this method's
  1.2361 -                returned object with its 
  1.2362 -                <a class="idlType" href="#widl-IDBErrorEvent-code"><code>code</code></a> set
  1.2363 -                to <a class="idlType" href="#widl-IDBDatabaseException-UNKNOWN_ERR"><code>UNKNOWN_ERR</code></a>
  1.2364 -                and a suitable 
  1.2365 -                <a class="idlType" href="#widl-IDBErrorEvent-message"><code>message</code></a>.
  1.2366 -              </p>
  1.2367 -    
  1.2368 -              <ol>
  1.2369 -                <li>
  1.2370 -                  Let <var>origin</var> be the origin of the active document from which
  1.2371 -                  the method was invoked.                
  1.2372 -                </li>
  1.2373 -                <li>
  1.2374 -                  Perform the <a>steps for opening a database</a>, with <var>origin</var>,
  1.2375 -                  the <var>name</var> parameter and <var>description</var> parameter, and 
  1.2376 -                  call its result as <var>result</var>.
  1.2377 -                </li>
  1.2378 -                <li>
  1.2379 -                  If the steps were aborted with an error code, then set this request's
  1.2380 -                  <a class="idlType" href="#widl-IDBRequest-error"><code>error</code></a> with that code 
  1.2381 -                  and abort these steps.
  1.2382 -                </li>
  1.2383 -                <li>
  1.2384 -                  Create a <a><code>IDBDatabaseRequest</code></a> object for <var>result</var>
  1.2385 -                  and call it <var>db</var>.
  1.2386 -                </li>
  1.2387 -                <li>
  1.2388 -                  Fire a <a title="event-success">success event</a> on this method's
  1.2389 -                  returned object with its 
  1.2390 -                  <a class="idlType" href="#widl-IDBSuccessEvent-result"><code>result</code></a> set
  1.2391 -                  to <var>db</var>.
  1.2392 -              </ol>              
  1.2393 -              <dl class="parameters">
  1.2394 -                <dt>DOMString name</dt>
  1.2395 -                <dd>The <a title="database name">name</a> for the <a>database</a></dd>
  1.2396 -                <dt>DOMString description</dt>
  1.2397 -                <dd>The description for the <a>database</a></dd>
  1.2398 -                <!-- TODO Jonas wants to take this out-->
  1.2399 -                <dt>optional boolean modifyDatabase</dt>
  1.2400 -                <dd>This defaults to true</dd>
  1.2401 -              </dl>
  1.2402 -              <dl class="exception" title="IDBDatabaseException">
  1.2403 -                <dt>NON_TRANSIENT_ERR</dt>
  1.2404 -                <dd>if the <var>name</var> parameter is not <a>valid</a></dd>
  1.2405 -              </dl>
  1.2406 -            </dd>
  1.2407 -          </dl>
  1.2408 -          <dl class="idl" title="[NoInterfaceObject] interface IDBDatabaseRequest : IDBDatabase">
  1.2409 -            <dt>IDBRequest createObjectStore()</dt>
  1.2410 -            <dd>
  1.2411 -              <p>
  1.2412 -                This method returns immediately and creates a new <a>object store</a>
  1.2413 -                with the given name in the <a title="connection">connected</a> 
  1.2414 -                <a>database</a>. If an <a>object store</a> with the same name, compared
  1.2415 -                in a case-sensitive manner, already exists in the 
  1.2416 -                <a title="connection">connected</a> <a>database</a>, then an
  1.2417 -                <a title="event-error">error event</a> is fired on this method's
  1.2418 -                returned object with its <a class="idlType" href="#widl-IDBErrorEvent-code"><code>code</code></a>
  1.2419 -                set to <a class="idlType" href="#widl-IDBDatabaseException-CONSTRAINT_ERR"><code>CONSTRAINT_ERR</code></a>
  1.2420 -                and a suitable 
  1.2421 -                <a class="idlType" href="#widl-IDBErrorEvent-message"><code>message</code></a>.
  1.2422 -                If the <a>object store</a> is created successfully, then a
  1.2423 -                <a title="event-success">success event</a> is fired on this method's
  1.2424 -                returned object with its 
  1.2425 -                <a class="idlType" href="#widl-IDBSuccessEvent-result"><code>result</code></a> set
  1.2426 -                to a new <a><code>IDBObjectStoreRequest</code></a> for that <a>object store</a>.
  1.2427 -              </p>
  1.2428 -              <dl class="parameters">
  1.2429 -                <dt>DOMString name</dt>
  1.2430 -                <dd>The <a title="object store name">name</a> of a new <a>object store</a></dd>
  1.2431 -                <dt>[TreatNullAs=EmptyString] optional DOMString keyPath</dt>
  1.2432 -                <dd>The <a title="object store key path">key path</a> of a new 
  1.2433 -                <a>object store</a>. If <a>null</a> path is specified, then the 
  1.2434 -                <a>object store</a> created will not have a <a>key path</a> and will
  1.2435 -                use <a>out-of-line keys</a>.</dd>
  1.2436 -                <dt>optional boolean autoIncrement</dt>
  1.2437 -                <dd>Whether the <a>object store</a> created should have a 
  1.2438 -                <a>key generator</a>. This defaults to <code>true</code>.</dd>
  1.2439 -              </dl>
  1.2440 -            </dd>
  1.2441 -            <dt>IDBRequest openObjectStore()</dt>
  1.2442 -            <dd>
  1.2443 -              <p>
  1.2444 -                This method returns immediately and opens the <a>object store</a> with 
  1.2445 -                the given name in the <a title="connection">connected</a> <a>database</a>
  1.2446 -                for the <a>mode</a> specified. If an <a>object store</a> with the given
  1.2447 -                name does not exist in the <a title="connection">connected</a> <a>database</a>, 
  1.2448 -                then an
  1.2449 -                <a title="event-error">error event</a> is fired on this method's
  1.2450 -                returned object with its 
  1.2451 -                <a class="idlType" href="#widl-IDBErrorEvent-code"><code>code</code></a> set to
  1.2452 -                <a class="idlType" href="#widl-IDBDatabaseException-NOT_FOUND_ERR"><code>NOT_FOUND_ERR</code></a>
  1.2453 -                and a suitable 
  1.2454 -                <a class="idlType" href="#widl-IDBErrorEvent-message"><code>message</code></a>.
  1.2455 -                If the <a>object store</a> is opened, then a
  1.2456 -                <a title="event-success">success event</a> is fired on this method's
  1.2457 -                returned object with its 
  1.2458 -                <a class="idlType" href="#widl-IDBSuccessEvent-result"><code>result</code></a> set to a new 
  1.2459 -                <a><code>IDBObjectStoreRequest</code></a> for that <a>object store</a>.
  1.2460 -              </p>              
  1.2461 -              <dl class="parameters">
  1.2462 -                <dt>DOMString name</dt>
  1.2463 -                <dd>The <a title="object store name">name</a> of an existing 
  1.2464 -                <a>object store</a></dd>
  1.2465 -                <dt>optional unsigned short mode</dt>
  1.2466 -                <dd>The <a>mode</a> used to access the <a>object store</a></dd>
  1.2467 -              </dl>
  1.2468 -            </dd>
  1.2469 -            <dt>IDBRequest removeObjectStore()</dt>
  1.2470 -            <dd>
  1.2471 -              <p>
  1.2472 -                This method returns immediately and destroys the <a>object store</a>
  1.2473 -                with the given name in the <a title="connection">connected</a> 
  1.2474 -                <a>database</a> as well as all <a title="index">indexes</a> that are 
  1.2475 -                <a title="referenced">referencing</a> that <a>object store</a>. If an 
  1.2476 -                <a>object store</a> with the given name does not exist in the 
  1.2477 -                <a title="connection">connected</a> <a>database</a>, 
  1.2478 -                then an
  1.2479 -                <a title="event-error">error event</a> is fired on this method's
  1.2480 -                returned object with its 
  1.2481 -                <a class="idlType" href="#widl-IDBErrorEvent-code"><code>code</code></a> set to
  1.2482 -                <a class="idlType" href="#widl-IDBDatabaseException-NOT_FOUND_ERR"><code>NOT_FOUND_ERR</code></a>
  1.2483 -                and a suitable 
  1.2484 -                <a class="idlType" href="#widl-IDBErrorEvent-message"><code>message</code></a>.
  1.2485 -              </p>
  1.2486 -              
  1.2487 -              <dl class="parameters">
  1.2488 -                <dt>DOMString storeName</dt>
  1.2489 -                <dd>The <a title="object store name">name</a> of an existing
  1.2490 -                <a>object store</a></dd>
  1.2491 -              </dl>
  1.2492 -            </dd>
  1.2493 -            <dt>void setVersion()</dt>
  1.2494 -            <dd>
  1.2495 -              This method returns immediately and sets the <a>version</a> of the 
  1.2496 -              <a title="connection">connected</a> <a>database</a>.
  1.2497 -              <dl class="parameters">
  1.2498 -                <dt>[TreatNullAs=EmptyString] DOMString      version</dt>
  1.2499 -                <dd>The <a>version</a> to store in the <a>database</a></dd>
  1.2500 -              </dl>
  1.2501 -            </dd>
  1.2502 -            <dt>IDBRequest openTransaction()</dt>
  1.2503 -            <dd>
  1.2504 -              This method returns immediately and performs the 
  1.2505 -              <a>steps for creating a transaction</a> with the list of <a>database</a> 
  1.2506 -              <a>objects</a> for acquiring locks required in this <a>transaction</a> 
  1.2507 -              and an optional timeout duration. If a <a>transaction</a> can be created
  1.2508 -              successfully, then a
  1.2509 -              <a title="event-success">success event</a> is fired on this method's
  1.2510 -              returned object with its 
  1.2511 -              <a class="idlType" href="#widl-IDBSuccessEvent-result"><code>result</code></a> set to a new 
  1.2512 -              <a><code>IDBTransactionRequest</code></a> object. If reserving all the 
  1.2513 -              <a>database</a> <a>objects</a> identified in the requested <a>scope</a> 
  1.2514 -              takes longer than the specified timeout interval, then an
  1.2515 -              <a title="event-error">error event</a> is fired on this method's
  1.2516 -              returned object with its 
  1.2517 -              <a class="idlType" href="#widl-IDBErrorEvent-code"><code>code</code></a> set to
  1.2518 -              <a class="idlType" href="#widl-IDBDatabaseException-TIMEOUT_ERR"><code>TIMEOUT_ERR</code></a>
  1.2519 -              and a suitable 
  1.2520 -              <a class="idlType" href="#widl-IDBErrorEvent-message"><code>message</code></a>.
  1.2521 -              <dl class="parameters">
  1.2522 -                <dt>optional DOMStringList storeNames</dt>
  1.2523 -                <dd>The names of <a title="object store">object stores</a> and 
  1.2524 -                <a title="index">indexes</a> in the <a>scope</a> of the new
  1.2525 -                <a>transaction</a></dd>
  1.2526 -                <dt>optional unsigned long timeout</dt>
  1.2527 -                <dd>The interval which this operation is allowed to take to
  1.2528 -                reserve all the <a>database</a> objects identified in the new
  1.2529 -                <a title="transaction">transaction's</a> <a>scope</a>. The default
  1.2530 -                is user agent specific</dd>
  1.2531 -              </dl>
  1.2532 -            </dd>
  1.2533 -          </dl>
  1.2534 -          <dl class="idl" title="[NoInterfaceObject] interface IDBObjectStoreRequest : IDBObjectStore">
  1.2535 -            <dt>IDBRequest put()</dt>
  1.2536 -            <dd>
  1.2537 -              This method returns immediately and stores the given value in this 
  1.2538 -              <a>object store</a> by following the 
  1.2539 -              <a>steps for storing a record into an object store</a>. If the record
  1.2540 -              can be successfully stored in the <a>object store</a>, then a
  1.2541 -              <a title="event-success">success event</a> is fired on this method's
  1.2542 -              returned object with its 
  1.2543 -              <a class="idlType" href="#widl-IDBSuccessEvent-result"><code>result</code></a> set to
  1.2544 -              the key for the stored record.
  1.2545 -              If this <a>object store</a> uses 
  1.2546 -              <a>out-of-line</a> keys but does not use a <a>key generator</a> and the
  1.2547 -              <var>key</var> parameter was not passed, then an
  1.2548 -              <a title="event-error">error event</a> is fired on this method's
  1.2549 -              returned object with its 
  1.2550 -              <a class="idlType" href="#widl-IDBErrorEvent-code"><code>code</code></a> set to
  1.2551 -              <a class="idlType" href="#widl-IDBDatabaseException-DATA_ERR"><code>DATA_ERR</code></a>
  1.2552 -              and a suitable 
  1.2553 -              <a class="idlType" href="#widl-IDBErrorEvent-message"><code>message</code></a>.
  1.2554 -              If the data being 
  1.2555 -              stored could not be serialized by the <a>internal structured cloning algorithm</a>,
  1.2556 -              then an
  1.2557 -              <a title="event-error">error event</a> is fired on this method's
  1.2558 -              returned object with its 
  1.2559 -              <a class="idlType" href="#widl-IDBErrorEvent-code"><code>code</code></a> set to
  1.2560 -              <a class="idlType" href="#widl-IDBDatabaseException-SERIAL_ERR"><code>SERIAL_ERR</code></a>
  1.2561 -              and a suitable 
  1.2562 -              <a class="idlType" href="#widl-IDBErrorEvent-message"><code>message</code></a>.
  1.2563 -              <dl class="parameters">
  1.2564 -                <dt>any value</dt>
  1.2565 -                <dd>The value to be stored in the record</dd>
  1.2566 -                <dt>optional any key</dt>
  1.2567 -                <dd>The key used to identify the record</dd>
  1.2568 -              </dl>
  1.2569 -            </dd>
  1.2570 -            <dt>IDBRequest add()</dt>
  1.2571 -            <dd>
  1.2572 -              This method returns immediately and stores the given value in this 
  1.2573 -              <a>object store</a> by following the 
  1.2574 -              <a>steps for storing a record into an object store</a> with the no-overwrite flag
  1.2575 -              set. If the record
  1.2576 -              can be successfully stored in the <a>object store</a>, then the 
  1.2577 -              <a class="idlType" href="#widl-IDBRequest-result"><code>result</code></a>
  1.2578 -              of this object's request is set to the key for the stored record.
  1.2579 -              If a record exists
  1.2580 -              in this <a>object store</a> for the key <var>key</var> parameter, then an
  1.2581 -              <a title="event-error">error event</a> is fired on this method's
  1.2582 -              returned object with its 
  1.2583 -              <a class="idlType" href="#widl-IDBErrorEvent-code"><code>code</code></a> set to
  1.2584 -              <a class="idlType" href="#widl-IDBDatabaseException-CONSTRAINT_ERR"><code>CONSTRAINT_ERR</code></a>
  1.2585 -              If this <a>object store</a> uses 
  1.2586 -              <a>out-of-line</a> keys but does not use a <a>key generator</a> and the
  1.2587 -              <var>key</var> parameter was not passed, then an
  1.2588 -              <a title="event-error">error event</a> is fired on this method's
  1.2589 -              returned object with its 
  1.2590 -              <a class="idlType" href="#widl-IDBErrorEvent-code"><code>code</code></a> set to
  1.2591 -              <a class="idlType" href="#widl-IDBDatabaseException-DATA_ERR"><code>DATA_ERR</code></a>
  1.2592 -              and a suitable 
  1.2593 -              <a class="idlType" href="#widl-IDBErrorEvent-message"><code>message</code></a>.
  1.2594 -              If the data being 
  1.2595 -              stored could not be serialized by the <a>internal structured cloning algorithm</a>,
  1.2596 -              then an
  1.2597 -              <a title="event-error">error event</a> is fired on this method's
  1.2598 -              returned object with its 
  1.2599 -              <a class="idlType" href="#widl-IDBErrorEvent-code"><code>code</code></a> set to
  1.2600 -              <a class="idlType" href="#widl-IDBDatabaseException-SERIAL_ERR"><code>SERIAL_ERR</code></a>
  1.2601 -              and a suitable 
  1.2602 -              <a class="idlType" href="#widl-IDBErrorEvent-message"><code>message</code></a>.
  1.2603 -              <dl class="parameters">
  1.2604 -                <dt>any value</dt>
  1.2605 -                <dd>The value to be stored in the record</dd>
  1.2606 -                <dt>optional any key</dt>
  1.2607 -                <dd>The key used to identify the record</dd>
  1.2608 -              </dl>
  1.2609 -            </dd>
  1.2610 -            <dt>IDBRequest remove()</dt>
  1.2611 -            <dd>
  1.2612 -              This method returns immediately and removes the record from this 
  1.2613 -              <a>object store</a> by following the 
  1.2614 -              <a>steps for deleting a record from an object store</a> corresponding to
  1.2615 -              the given key. If a record did not exist in this <a>object store</a> 
  1.2616 -              for the key <var>key</var> parameter, then an 
  1.2617 -              <a title="event-error">error event</a> is fired on this method's
  1.2618 -              returned object with its 
  1.2619 -              <a class="idlType" href="#widl-IDBErrorEvent-code"><code>code</code></a> set to
  1.2620 -              <a class="idlType" href="#widl-IDBDatabaseException-NOT_FOUND_ERR"><code>NOT_FOUND_ERR</code></a>
  1.2621 -              and a suitable 
  1.2622 -              <a class="idlType" href="#widl-IDBErrorEvent-message"><code>message</code></a>.
  1.2623 -              <dl class="parameters">
  1.2624 -                <dt>any key</dt>
  1.2625 -                <dd>Key identifying the record to be removed</dd>
  1.2626 -              </dl>
  1.2627 -            </dd>
  1.2628 -            <dt>IDBRequest get()</dt>
  1.2629 -            <dd>
  1.2630 -              This method returns immediately and retrieves the value from this 
  1.2631 -              <a>object store</a> for the record corresponding to the given key by
  1.2632 -              following the <a>steps for retrieving a record from an object store</a>. 
  1.2633 -              If the operation is successful, then the 
  1.2634 -              <a class="idlType" href="#widl-IDBRequest-result"><code>result</code></a> of this object's request
  1.2635 -              is set to the retrieved value. If a record did not exist in this 
  1.2636 -              <a>object store</a> for the key <var>key</var> parameter, then an 
  1.2637 -              <a title="event-error">error event</a> is fired on this method's
  1.2638 -              returned object with its 
  1.2639 -              <a class="idlType" href="#widl-IDBErrorEvent-code"><code>code</code></a> set to
  1.2640 -              <a class="idlType" href="#widl-IDBDatabaseException-NOT_FOUND_ERR"><code>NOT_FOUND_ERR</code></a>
  1.2641 -              and a suitable 
  1.2642 -              <a class="idlType" href="#widl-IDBErrorEvent-message"><code>message</code></a>.
  1.2643 -              <dl class="parameters">
  1.2644 -                <dt>any key</dt>
  1.2645 -                <dd>Key identifying the record to be retrieved</dd>
  1.2646 -              </dl>
  1.2647 -            </dd>
  1.2648 -            <dt>IDBRequest openCursor()</dt>
  1.2649 -            <dd>
  1.2650 -              This method returns immediately and creates a <a>cursor</a> over the 
  1.2651 -              <a>records</a> of this <a>object store</a>. The <a>range</a> of this
  1.2652 -              <a>cursor</a> matches the <a>key range</a> specified as the
  1.2653 -              <var>range</var> parameter, or if that parameter is not specified or
  1.2654 -              <code>null</code>, then the range includes all the <a>records</a>. 
  1.2655 -              If there is even a single record that matches the <a>key range</a>, then a
  1.2656 -              <a title="event-success">success event</a> is fired on this method's
  1.2657 -              returned object with its 
  1.2658 -              <a class="idlType" href="#widl-IDBSuccessEvent-result"><code>result</code></a> set to the
  1.2659 -              <a><code>IDBCursorRequest</code></a> object for that <a>cursor</a>. If no
  1.2660 -              records match the <a>key range</a>, then an 
  1.2661 -              <a title="event-error">error event</a> is fired on this method's
  1.2662 -              returned object with its 
  1.2663 -              <a class="idlType" href="#widl-IDBErrorEvent-code"><code>code</code></a> set to
  1.2664 -              <a class="idlType" href="#widl-IDBDatabaseException-NOT_FOUND_ERR"><code>NOT_FOUND_ERR</code></a>
  1.2665 -              and a suitable 
  1.2666 -              <a class="idlType" href="#widl-IDBErrorEvent-message"><code>message</code></a>.
  1.2667 -              <dl class="parameters">
  1.2668 -                <dt>optional IDBKeyRange    range</dt>
  1.2669 -                <dd>The <a>key range</a> to use as the <a>cursor</a>'s <a>range</a></dd>
  1.2670 -                <dt>optional unsigned short direction</dt>
  1.2671 -                <dd>The <a>cursor<a>'s required <a>direction</a></dd>
  1.2672 -              </dl>
  1.2673 -            </dd>
  1.2674 -            <dt>IDBRequest createIndex()</dt>
  1.2675 -            <dd>
  1.2676 -              <p>
  1.2677 -                This method returns immediately and creates a new <a>index</a>
  1.2678 -                with the given name and parameters in the 
  1.2679 -                <a title="connection">connected</a> <a>database</a>. If an <a>index</a> 
  1.2680 -                with the same name, compared in a case-sensitive manner, already exists
  1.2681 -                in the <a title="connection">connected</a> <a>database</a>, then an 
  1.2682 -                <a title="event-error">error event</a> is fired on this method's
  1.2683 -                returned object with its 
  1.2684 -                <a class="idlType" href="#widl-IDBErrorEvent-code"><code>code</code></a> set to
  1.2685 -                <a class="idlType" href="#widl-IDBDatabaseException-CONSTRAINT_ERR"><code>CONSTRAINT_ERR</code></a>
  1.2686 -                and a suitable 
  1.2687 -                <a class="idlType" href="#widl-IDBErrorEvent-message"><code>message</code></a>.
  1.2688 -                If the <a>object store</a> with the
  1.2689 -                given name does not exist in the <a title="connection">connected</a> 
  1.2690 -                <a>database</a> then an 
  1.2691 -                <a title="event-error">error event</a> is fired on this method's
  1.2692 -                returned object with its 
  1.2693 -                <a class="idlType" href="#widl-IDBErrorEvent-code"><code>code</code></a> set to
  1.2694 -                <a class="idlType" href="#widl-IDBDatabaseException-NOT_FOUND_ERR"><code>NOT_FOUND_ERR</code></a>
  1.2695 -                and a suitable 
  1.2696 -                <a class="idlType" href="#widl-IDBErrorEvent-message"><code>message</code></a>.
  1.2697 -                If the <a>index</a> is created, then a
  1.2698 -                <a title="event-success">success event</a> is fired on this method's
  1.2699 -                returned object with its 
  1.2700 -                <a class="idlType" href="#widl-IDBSuccessEvent-result"><code>result</code></a> set to a new
  1.2701 -                <a><code>IDBIndexRequest</code></a> for that <a>index</a>.
  1.2702 -              </p>
  1.2703 -              <dl class="parameters">
  1.2704 -                <dt>DOMString      name</dt>
  1.2705 -                <dd>The <a title="index name">name</a> of a new <a>index</a></dd>
  1.2706 -                <!-- this is removed because it is implicit on the store
  1.2707 -                <dt>DOMString      storeName</dt>
  1.2708 -                <dd>The <a title="object store name">name</a> of an existing
  1.2709 -                <a>object store</a> <a>referenced</a> by the new <a>index</a></dd>-->
  1.2710 -                <dt>DOMString      keyPath</dt>
  1.2711 -                <dd>The <a title="index key path">key path used by the new
  1.2712 -                <a>index</a></dd>
  1.2713 -                <dt>optional boolean unique</dt>
  1.2714 -                <dd>The <a>unique</a> flag for the new <a>index</a></dd>
  1.2715 -              </dl>
  1.2716 -            </dd>
  1.2717 -            <dt>IDBRequest openIndex()</dt>
  1.2718 -            <dd>
  1.2719 -              <p>
  1.2720 -                This method returns immediately and opens the <a>index</a> with the
  1.2721 -                given name in the <a title="connection">connected</a> <a>database</a>.
  1.2722 -                If an <a>index</a> with the given
  1.2723 -                name does not exist in the <a title="connection">connected</a> <a>database</a>, then an
  1.2724 -                <a title="event-error">error event</a> is fired on this method's
  1.2725 -                returned object with its 
  1.2726 -                <a class="idlType" href="#widl-IDBErrorEvent-code"><code>code</code></a> set to
  1.2727 -                <a class="idlType" href="#widl-IDBDatabaseException-NOT_FOUND_ERR"><code>NOT_FOUND_ERR</code></a>
  1.2728 -                and a suitable 
  1.2729 -                <a class="idlType" href="#widl-IDBErrorEvent-message"><code>message</code></a>.
  1.2730 -                If the <a>index</a> is opened, then a
  1.2731 -                <a title="event-success">success event</a> is fired on this method's
  1.2732 -                returned object with its 
  1.2733 -                <a class="idlType" href="#widl-IDBSuccessEvent-result"><code>result</code></a> set to a new 
  1.2734 -                <a><code>IDBIndexRequest</code></a> for that <a>index</a>.
  1.2735 -              </p>              
  1.2736 -              <dl class="parameters">
  1.2737 -                <dt>DOMString name</dt>
  1.2738 -                <dd>The <a title="index name">name</a> of an existing <a>index</a></dd>
  1.2739 -              </dl>      
  1.2740 -            </dd>
  1.2741 -            <dt>IDBRequest removeIndex()</dt>
  1.2742 -            <dd>
  1.2743 -              <p>
  1.2744 -                This method returns immediately and destroys the <a>index</a>
  1.2745 -                with the given name in the <a title="connection">connected</a> 
  1.2746 -                <a>database</a>. If an <a>index</a> with the given name does not 
  1.2747 -                exist in the <a title="connection">connected</a> <a>database</a>, then an
  1.2748 -                <a title="event-error">error event</a> is fired on this method's
  1.2749 -                returned object with its 
  1.2750 -                <a class="idlType" href="#widl-IDBErrorEvent-code"><code>code</code></a> set to
  1.2751 -                <a class="idlType" href="#widl-IDBDatabaseException-NOT_FOUND_ERR"><code>NOT_FOUND_ERR</code></a>
  1.2752 -                and a suitable 
  1.2753 -                <a class="idlType" href="#widl-IDBErrorEvent-message"><code>message</code></a>.
  1.2754 -              </p>
  1.2755 -              <dl class="parameters">
  1.2756 -                <dt>DOMString indexName</dt>
  1.2757 -                <dd>The <a title="index name">name</a> of an existing <a>index</a></dd>
  1.2758 -              </dl>
  1.2759 -            </dd>
  1.2760 -          </dl>
  1.2761 -          <dl class="idl" title="[NoInterfaceObject] interface IDBIndexRequest : IDBIndex">
  1.2762 -            <dt>IDBCursorRequest openObjectCursor()</dt>
  1.2763 -            <dd>
  1.2764 -              This method returns immediately and creates a <a>cursor</a> over the 
  1.2765 -              <a>records</a> of this <a>index</a>'s <a>referenced</a> <a>object store</a> 
  1.2766 -              as arranged by this <a>index</a>. The <a>range</a> of this <a>cursor</a> 
  1.2767 -              matches the <a>key range</a> specified as the <var>range</var> parameter, or
  1.2768 -              if that parameter is not specified or <code>null</code>, then the 
  1.2769 -              range includes all the <a>records</a>.
  1.2770 -              If there is even a single record that matches the <a>key range</a>, then a
  1.2771 -              <a title="event-success">success event</a> is fired on this method's
  1.2772 -              returned object with its 
  1.2773 -              <a class="idlType" href="#widl-IDBSuccessEvent-result"><code>result</code></a> set to the
  1.2774 -              <a><code>IDBCursorRequest</code></a> object for that <a>cursor</a>. If no
  1.2775 -              records match the <a>key range</a>, then an
  1.2776 -              <a title="event-error">error event</a> is fired on this method's
  1.2777 -              returned object with its 
  1.2778 -              <a class="idlType" href="#widl-IDBErrorEvent-code"><code>code</code></a> set to
  1.2779 -              <a class="idlType" href="#widl-IDBDatabaseException-NOT_FOUND_ERR"><code>NOT_FOUND_ERR</code></a>
  1.2780 -              and a suitable 
  1.2781 -              <a class="idlType" href="#widl-IDBErrorEvent-message"><code>message</code></a>.
  1.2782 -              <dl class="parameters">
  1.2783 -                <dt>optional IDBKeyRange    range</dt>
  1.2784 -                <dd>The <a>key range</a> to use as the <a>cursor</a>'s <a>range</a></dd>
  1.2785 -                <dt>optional unsigned short direction</dt>
  1.2786 -                <dd>The <a>cursor<a>'s required <a>direction</a></dd>
  1.2787 -              </dl>
  1.2788 -            </dd>
  1.2789 -            <dt>IDBRequest openCursor()</dt>
  1.2790 -            <dd>
  1.2791 -              This method returns immediately and creates a <a>cursor</a> over the 
  1.2792 -              <a>records</a> of this <a>index</a>. The <a>range</a> of this <a>cursor</a>
  1.2793 -              matches the <a>key range</a> specified as the <var>range</var> parameter, or
  1.2794 -              if that parameter is not specified or <code>null</code>, then the 
  1.2795 -              range includes all the <a>records</a>. 
  1.2796 -              If there is even a single record that matches the <a>key range</a>, then a
  1.2797 -              <a title="event-success">success event</a> is fired on this method's
  1.2798 -              returned object with its 
  1.2799 -              <a class="idlType" href="#widl-IDBSuccessEvent-result"><code>result</code></a> set to the 
  1.2800 -              <a><code>IDBCursorRequest</code></a> object for that <a>cursor</a>. If no
  1.2801 -              records match the <a>key range</a>, then an
  1.2802 -              <a title="event-error">error event</a> is fired on this method's
  1.2803 -              returned object with its 
  1.2804 -              <a class="idlType" href="#widl-IDBErrorEvent-code"><code>code</code></a> set to
  1.2805 -              <a class="idlType" href="#widl-IDBDatabaseException-NOT_FOUND_ERR"><code>NOT_FOUND_ERR</code></a>
  1.2806 -              and a suitable 
  1.2807 -              <a class="idlType" href="#widl-IDBErrorEvent-message"><code>message</code></a>.
  1.2808 -              <dl class="parameters">
  1.2809 -                <dt>optional IDBKeyRange    range</dt>
  1.2810 -                <dd>The <a>key range</a> to use as the <a>cursor</a>'s <a>range</a></dd>
  1.2811 -                <dt>optional unsigned short direction</dt>
  1.2812 -                <dd>The <a>cursor<a>'s required <a>direction</a></dd>
  1.2813 -              </dl>
  1.2814 -            </dd>
  1.2815 -            <dt>IDBRequest put()</dt>
  1.2816 -            <dd>
  1.2817 -              This method returns immediately and stores the given value in this <a>index</a>
  1.2818 -              by following the <a>steps for storing a record into an index</a>. If the
  1.2819 -              operation succeeds, then a
  1.2820 -              <a title="event-success">success event</a> is fired on this method's
  1.2821 -              returned object with its 
  1.2822 -              <a class="idlType" href="#widl-IDBSuccessEvent-result"><code>result</code></a> set to the
  1.2823 -              key for the stored record. 
  1.2824 -              <dl class="parameters">
  1.2825 -                <dt>any value</dt>
  1.2826 -                <dd>The value to be stored in the record</dd>
  1.2827 -                <dt>optional any key</dt>
  1.2828 -                <dd>The key used to identify the record</dd>
  1.2829 -              </dl>
  1.2830 -            </dd>
  1.2831 -            <dt>IDBRequest add()</dt>
  1.2832 -            <dd>
  1.2833 -              This method returns immediately and stores the given value in this <a>index</a>
  1.2834 -              by following the <a>steps for storing a record into an index</a>. If the
  1.2835 -              operation succeeds, then a
  1.2836 -              <a title="event-success">success event</a> is fired on this method's
  1.2837 -              returned object with its 
  1.2838 -              <a class="idlType" href="#widl-IDBSuccessEvent-result"><code>result</code></a> set to a the
  1.2839 -              key for the stored record. If a record exists in this <a>index</a> for the key 
  1.2840 -              <var>key</var> parameter or this <a>index</a> is <a>auto-populated</a> or if no
  1.2841 -              record exists with key <var>value</var> parameter in the <a>index</a>'s
  1.2842 -              <a>referenced</a> <a>object store</a>, then an
  1.2843 -              <a title="event-error">error event</a> is fired on this method's
  1.2844 -              returned object with its 
  1.2845 -              <a class="idlType" href="#widl-IDBErrorEvent-code"><code>code</code></a> set to
  1.2846 -              <a class="idlType" href="#widl-IDBDatabaseException-CONSTRAINT_ERR"><code>CONSTRAINT_ERR</code></a>
  1.2847 -              <dl class="parameters">
  1.2848 -                <dt>any value</dt>
  1.2849 -                <dd>The value to be stored in the record</dd>
  1.2850 -                <dt>optional any key</dt>
  1.2851 -                <dd>The key used to identify the record</dd>
  1.2852 -              </dl>
  1.2853 -            </dd>
  1.2854 -            <dt>IDBRequest getObject()</dt>
  1.2855 -            <dd>
  1.2856 -              This method returns immediately and retrieves the value from this <a>index</a>'s
  1.2857 -              <a>referenced</a> <a>object store</a> for the record corresponding to the given
  1.2858 -              key by following the <a>steps for retrieving a record from an index</a>.
  1.2859 -              If the operation is successful, then the 
  1.2860 -              <a class="idlType" href="#widl-IDBRequest-result"><code>result</code></a> of this object's request
  1.2861 -              is set to the retrieved value. If a record did not exist in this 
  1.2862 -              <a>index</a> for the key <var>key</var> parameter, then an
  1.2863 -              <a title="event-error">error event</a> is fired on this method's
  1.2864 -              returned object with its 
  1.2865 -              <a class="idlType" href="#widl-IDBErrorEvent-code"><code>code</code></a> set to
  1.2866 -              <a class="idlType" href="#widl-IDBDatabaseException-NOT_FOUND_ERR"><code>NOT_FOUND_ERR</code></a>
  1.2867 -              and a suitable 
  1.2868 -              <a class="idlType" href="#widl-IDBErrorEvent-message"><code>message</code></a>.
  1.2869 -              <dl class="parameters">
  1.2870 -                <dt>any key</dt>
  1.2871 -                <dd>Key identifying the record to be retrieved</dd>
  1.2872 -              </dl>
  1.2873 --            </dd>
  1.2874 -            <dt>IDBRequest get()</dt>
  1.2875 -            <dd>
  1.2876 -              This method returns immediately and retrieves the value from this <a>index</a>
  1.2877 -              for the record corresponding to the given <var>key</var> parameter by 
  1.2878 -              following the <a>steps for retrieving a value from an index</a>.
  1.2879 -              If the operation is successful, then the 
  1.2880 -              <a class="idlType" href="#widl-IDBRequest-result"><code>result</code></a> of this object's request
  1.2881 -              is set to the retrieved value. If a record did not exist in this 
  1.2882 -              <a>index</a> for the key <var>key</var> parameter, then an
  1.2883 -              <a title="event-error">error event</a> is fired on this method's
  1.2884 -              returned object with its 
  1.2885 -              <a class="idlType" href="#widl-IDBErrorEvent-code"><code>code</code></a> set to
  1.2886 -              <a class="idlType" href="#widl-IDBDatabaseException-NOT_FOUND_ERR"><code>NOT_FOUND_ERR</code></a>
  1.2887 -              and a suitable 
  1.2888 -              <a class="idlType" href="#widl-IDBErrorEvent-message"><code>message</code></a>.
  1.2889 -              <dl class="parameters">
  1.2890 -                <dt>any key</dt>
  1.2891 -                <dd>Key identifying the record to be retrieved</dd>
  1.2892 -              </dl>
  1.2893 -            </dd>
  1.2894 -            <dt>IDBRequest remove()</dt>
  1.2895 -            <dd>
  1.2896 -              This method returns immediately and removes the records from this <a>index</a>
  1.2897 -              by following the <a>steps for deleting a record from an index</a>
  1.2898 -              corresponding to the given key. If a record did not exist in this 
  1.2899 -              <a>index</a> for the key <var>key</var> parameter, then an
  1.2900 -              <a title="event-error">error event</a> is fired on this method's
  1.2901 -              returned object with its 
  1.2902 -              <a class="idlType" href="#widl-IDBErrorEvent-code"><code>code</code></a> set to
  1.2903 -              <a class="idlType" href="#widl-IDBDatabaseException-NOT_FOUND_ERR"><code>NOT_FOUND_ERR</code></a>
  1.2904 -              and a suitable 
  1.2905 -              <a class="idlType" href="#widl-IDBErrorEvent-message"><code>message</code></a>.
  1.2906 -              <dl class="parameters">
  1.2907 -                <dt>any key</dt>
  1.2908 -                <dd>Key identifying the record to be removed</dd>
  1.2909 -              </dl>
  1.2910 -            </dd>
  1.2911 -          </dl>
  1.2912 -          <dl class="idl" title="[NoInterfaceObject] interface IDBCursorRequest : IDBCursor">
  1.2913 -            <dt>readonly attribute any key</dt>
  1.2914 -            <dd>The key for the record at the <a>cursor</a>'s <a>position</a>.</dd>
  1.2915 -            <dt>readonly attribute any value</dt>
  1.2916 -            <dd>The value for the record at the <a>cursor</a>'s <a>position</a>.</dd>
  1.2917 -            <dt>readonly attribute unsigned long long count</dt>
  1.2918 -            <dd>             
  1.2919 -              On getting, provide the approximate number of objects in the cursor.
  1.2920 -            </dd>
  1.2921 -            <dt>IDBRequest update(in any value)</dt>
  1.2922 -            <dd>
  1.2923 -              This method returns immediately and sets the value for the record at the
  1.2924 -              <a>cursor</a>'s <a>position</a>. If the underlying <a>object store</a> uses
  1.2925 -              <a>in-line keys</a> and the property at the 
  1.2926 -              <a title="object store key path">key path</a> does not match the key in this
  1.2927 -              <a>cursor</a>'s <a>position</a>, then an
  1.2928 -              <a title="event-error">error event</a> is fired on this method's
  1.2929 -              returned object with its 
  1.2930 -              <a class="idlType" href="#widl-IDBErrorEvent-code"><code>code</code></a> set to
  1.2931 -              <a class="idlType" href="#widl-IDBDatabaseException-DATA_ERR"><code>DATA_ERR</code></a>
  1.2932 -              and a suitable 
  1.2933 -              <a class="idlType" href="#widl-IDBErrorEvent-message"><code>message</code></a>.                             
  1.2934 -              If the underlying 
  1.2935 -              <a>index</a> or <a>object store</a> does not support updating the item 
  1.2936 -              because it is open in the <a class="idlType" href="#widl-IDBObjectStore-READ_ONLY"><code>READ_ONLY</code></a> or 
  1.2937 -              <a class="idlType" href="#widl-IDBObjectStore-SNAPSHOT_READ"><code>SNAPSHOT_READ</code></a> <a>mode</a>, then an
  1.2938 -              <a title="event-error">error event</a> is fired on this method's
  1.2939 -              returned object with its 
  1.2940 -              <a class="idlType" href="#widl-IDBErrorEvent-code"><code>code</code></a> set to
  1.2941 -              <a class="idlType" href="#widl-IDBDatabaseException-NOT_ALLOWED_ERR"><code>NOT_ALLOWED_ERR</code></a>
  1.2942 -              and a suitable 
  1.2943 -              <a class="idlType" href="#widl-IDBErrorEvent-message"><code>message</code></a>.
  1.2944 -              If the data being stored could not be serialized by the 
  1.2945 -              <a>internal structured cloning algorithm</a>,  then an
  1.2946 -              <a title="event-error">error event</a> is fired on this method's
  1.2947 -              returned object with its 
  1.2948 -              <a class="idlType" href="#widl-IDBErrorEvent-code"><code>code</code></a> set to
  1.2949 -              <a class="idlType" href="#widl-IDBDatabaseException-SERIAL_ERR"><code>SERIAL_ERR</code></a>
  1.2950 -              and a suitable 
  1.2951 -              <a class="idlType" href="#widl-IDBErrorEvent-message"><code>message</code></a>.
  1.2952 -            </dd>
  1.2953 -            <dt>boolean    continue()</dt>
  1.2954 -            <dd>
  1.2955 -              This method returns immediately and advances the <a>cursor</a> to the next
  1.2956 -              position along its <a>direction</a> to the item whose key matches the
  1.2957 -              optional parameter. If no such parameter is provided, advance to the
  1.2958 -              immediate next position. If the <a>cursor</a> has reached the end of its
  1.2959 -              <a>range</a>, then an
  1.2960 -              <a title="event-error">error event</a> is fired on this method's
  1.2961 -              returned object with its 
  1.2962 -              <a class="idlType" href="#widl-IDBErrorEvent-code"><code>code</code></a> set to
  1.2963 -              <a class="idlType" href="#widl-IDBDatabaseException-NOT_ALLOWED_ERR"><code>NOT_ALLOWED_ERR</code></a>
  1.2964 -              and a suitable 
  1.2965 -              <a class="idlType" href="#widl-IDBErrorEvent-message"><code>message</code></a>.
  1.2966 -              <dl class="parameters">
  1.2967 -                <dt>optional any key</dt>
  1.2968 -                <dd>The next key to position this <a>cursor</a> at</dd>
  1.2969 -              </dl>
  1.2970 -            </dd>
  1.2971 -            
  1.2972 -            <dt>IDBRequest    remove()</dt>
  1.2973 -            <dd>          
  1.2974 -              <p>
  1.2975 -                This method returns immediately and deletes the object at the 
  1.2976 -                <a>cursor</a>'s <a>position</a>. The cursor's
  1.2977 -                position is not changed. Any attempts to retrieve the cursor's
  1.2978 -                current value will return <code>null</code>. If the underlying 
  1.2979 -                <a>index</a> or <a>object store</a> does not support updating the item 
  1.2980 -                because it is open in the 
  1.2981 -                <a class="idlType" href="#widl-IDBObjectStore-READ_ONLY"><code>READ_ONLY</code></a> or 
  1.2982 -                <a class="idlType" href="#widl-IDBObjectStore-SNAPSHOT_READ"><code>SNAPSHOT_READ</code></a> 
  1.2983 -                <a>mode</a>, then an
  1.2984 -                <a title="event-error">error event</a> is fired on this method's
  1.2985 -                returned object with its 
  1.2986 -                <a class="idlType" href="#widl-IDBErrorEvent-code"><code>code</code></a> set to
  1.2987 -                <a class="idlType" href="#widl-IDBDatabaseException-NOT_ALLOWED_ERR"><code>NOT_ALLOWED_ERR</code></a>
  1.2988 -                and a suitable 
  1.2989 -                <a class="idlType" href="#widl-IDBErrorEvent-message"><code>message</code></a>.
  1.2990 -              </p>
  1.2991 -            </dd>
  1.2992 -          </dl>
  1.2993 -          <dl class="idl" title="[NoInterfaceObject] interface IDBTransactionRequest : IDBTransaction">
  1.2994 -            <dt>void abort()</dt>
  1.2995 -            <dd>
  1.2996 -              This method returns immediately and undoes all the changes performed to 
  1.2997 -              the <a>objects</a> of this <a>database</a> since the creation of this 
  1.2998 -              <a>transaction</a>. If this <a>transaction</a> has already been committed
  1.2999 -              or aborted,  then an
  1.3000 -              <a title="event-error">error event</a> is fired on this method's
  1.3001 -              returned object with its 
  1.3002 -              <a class="idlType" href="#widl-IDBErrorEvent-code"><code>code</code></a> set to
  1.3003 -              <a class="idlType" href="#widl-IDBDatabaseException-NON_TRANSIENT_ERR"><code>NON_TRANSIENT_ERR</code></a>
  1.3004 -              and a suitable 
  1.3005 -              <a class="idlType" href="#widl-IDBErrorEvent-message"><code>message</code></a>.
  1.3006 -            </dd>
  1.3007 -            <dt>void commit()</dt>
  1.3008 -            <dd>
  1.3009 -              This method returns immediately and durably stores all the changes made
  1.3010 -              to the <a>objects</a> of this <a>database</a> since the creation of this
  1.3011 -              <a>transaction</a>. If this <a>transaction</a> has already been committed
  1.3012 -              or aborted,  then an
  1.3013 -              <a title="event-error">error event</a> is fired on this method's
  1.3014 -              returned object with its 
  1.3015 -              <a class="idlType" href="#widl-IDBErrorEvent-code"><code>code</code></a> set to
  1.3016 -              <a class="idlType" href="#widl-IDBDatabaseException-NON_TRANSIENT_ERR"><code>NON_TRANSIENT_ERR</code></a>
  1.3017 -              and a suitable 
  1.3018 -              <a class="idlType" href="#widl-IDBErrorEvent-message"><code>message</code></a>.
  1.3019 -              If this <a>transaction</a>'s 
  1.3020 -              <a>scope</a> is <a>dynamic</a>, and the user agent cannot commit all the
  1.3021 -              changes due to conflicts with another <a>transaction</a>, then an
  1.3022 -              <a title="event-error">error event</a> is fired on this method's
  1.3023 -              returned object with its 
  1.3024 -              <a class="idlType" href="#widl-IDBErrorEvent-code"><code>code</code></a> set to
  1.3025 -              <a class="idlType" href="#widl-IDBDatabaseException-RECOVERABLE_ERR"><code>RECOVERABLE_ERR</code></a>
  1.3026 -              and a suitable 
  1.3027 -              <a class="idlType" href="#widl-IDBErrorEvent-message"><code>message</code></a>.
  1.3028 -            </dd>
  1.3029 -          </dl>
  1.3030 -        </section>
  1.3031 -                  
  1.3032 -      </section>            
  1.3033 -    </section> <!-- API -->      
  1.3034 +      </section>
  1.3035  
  1.3036 -
  1.3037 -    </section> <!-- database-api -->
  1.3038 +    </section> 
  1.3039 +  <!-- database-api -->
  1.3040  
  1.3041  
  1.3042  	    <section id="privacy" class="section">
     2.1 --- a/Speclet_020_IDB_API_Constructs.html	Thu Jun 17 12:31:27 2010 -0700
     2.2 +++ b/Speclet_020_IDB_API_Constructs.html	Tue Jun 22 00:59:36 2010 +0800
     2.3 @@ -117,13 +117,13 @@
     2.4    <body>
     2.5      <section id="abstract">
     2.6        <p>
     2.7 -        This document defines APIs for a database of records holding simple values
     2.8 -        and hierarchical objects. Each record consists of a key and some value.
     2.9 -        Moreover, the database maintains indexes over records it stores. An
    2.10 -        application developer directly uses an API to locate records either by
    2.11 -        their key or by using an index. A query language can be layered on this
    2.12 -        API. An indexed database can be implemented using a persistent B-tree data
    2.13 -        structure.
    2.14 +        This document defines APIs for a database of records holding simple 
    2.15 +        values and hierarchical objects. Each record consists of a key and some 
    2.16 +        value. Moreover, the database maintains indexes over records it stores. 
    2.17 +        An application developer directly uses an API to locate records either 
    2.18 +        by their key or by using an index. A query language can be layered on 
    2.19 +        this API. An indexed database can be implemented using a persistent 
    2.20 +        B-tree data structure.
    2.21        </p>
    2.22      </section>
    2.23  
    2.24 @@ -136,18 +136,19 @@
    2.25        <h3>Constructs</h3>
    2.26          <p>
    2.27            An indexed database is made of records holding simple values
    2.28 -          and hierarchical objects. Each record consists of a key and a value. 
    2.29 +          and hierarchical objects. Each <dfn>record</dfn> consists of a key and a value. 
    2.30          </p>
    2.31          
    2.32          <section id="key-construct" class="section">
    2.33            <h4>Keys</h4>
    2.34            
    2.35            <p>
    2.36 -            In order to efficiently retrieve records stored in an indexed
    2.37 -            database, a user agent needs to organize each record according to its key. 
    2.38 -            <a>Conforming user agents</a> MUST support the use of values
    2.39 -            <code>null</code> and the IDL data types [[!WEBIDL]] <code>DOMString</code> and 
    2.40 -            <code>long long</code> as keys.
    2.41 +            In order to efficiently retrieve <a title="record">records</a> 
    2.42 +            stored in an indexed database, a user agent needs to organize each 
    2.43 +            <a>record</a> according to its key. <a>Conforming user agents</a> 
    2.44 +            MUST support the use of values <code>null</code> and the IDL data 
    2.45 +            types [[!WEBIDL]] <code>DOMString</code> and <code>long long</code> 
    2.46 +            as keys.
    2.47            </p>
    2.48            
    2.49            <p>
    2.50 @@ -183,31 +184,37 @@
    2.51          <section class="section" id="object-store-concept">  
    2.52            <h4>Object Store</h4>
    2.53            <p>
    2.54 -            An <dfn>object store</dfn> is a persistent storage mechanism that holds 
    2.55 -            key-value pairs, also called <dfn title="record">records</dfn>. An 
    2.56 -            <a>object store</a>'s <a title="record">records</a> are sorted by
    2.57 -            keys to enable fast insertion and look up as well as ordered retrieval. 
    2.58 -            Every <a>object store</a> has a <dfn title="object store name">name</dfn>.
    2.59 +            An <dfn>object store</dfn> is a persistent storage mechanism that 
    2.60 +            holds key-value pairs, also called <dfn title="record">records</dfn> 
    2.61 +            or <dfn>stored objects</dfn>. An <a>object store</a>'s 
    2.62 +            <a title="record">records</a> are sorted by keys to enable fast 
    2.63 +            insertion and look up as well as ordered retrieval. 
    2.64            </p>
    2.65 -          
    2.66 +          <p>
    2.67 +            Every <a>object store</a> has a 
    2.68 +            <dfn title="object store name">name</dfn>. Within a <a>database</a>, 
    2.69 +            each <a>object store</a> MUST have a <a title="valid-name">valid</a> 
    2.70 +            and unique <a title="object store name">name</a>. 
    2.71 +          </p>          
    2.72            <p>
    2.73              If an <a>object store</a> uses keys generated from a monotonically
    2.74 -            increasing sequence, it MUST have a <dfn>key generator</dfn> that produces
    2.75 -            unique keys for records in that <a>object store</a>. 
    2.76 -            Alternatively, if an application provides keys,
    2.77 -            they MAY either be identified as a part of the value being stored,
    2.78 -            also called <dfn>in-line keys</dfn>, or be identified separately, also
    2.79 -            called <dfn>out-of-line keys</dfn>. No two <a title="record">records</a>
    2.80 -            in an <a>object store</a> MAY be identified by the same key. An
    2.81 -            <a>object store</a> MUST have a <dfn title="object store key path">key path</dfn> 
    2.82 -            if it uses <a>in-line keys</a>. The <a>key path</a> MUST be the name of
    2.83 -            an enumerated property of all objects being stored in that 
    2.84 +            increasing sequence, it MUST have a <dfn>key generator</dfn> that 
    2.85 +            produces unique keys for <a title="record">records</a> in that 
    2.86 +            <a>object store</a>. Alternatively, if an application provides keys, 
    2.87 +            they MAY either be identified as a part of the value being stored, 
    2.88 +            also called <dfn>in-line keys</dfn>, or be identified separately, 
    2.89 +            also called <dfn>out-of-line keys</dfn>. No two 
    2.90 +            <a title="record">records</a> in an <a>object store</a> MAY be 
    2.91 +            identified by the same key. An <a>object store</a> MUST have a 
    2.92 +            <dfn title="object store key path">key path</dfn> if it uses 
    2.93 +            <a>in-line keys</a>. The <a>key path</a> MUST be the name 
    2.94 +            of an enumerated property of all stored objects in that 
    2.95              <a>object store</a>.
    2.96            </p>
    2.97            
    2.98            <p>
    2.99 -            Concurrent access to an <a>object store</a> MAY be isolated in one of 
   2.100 -            three <dfn title="mode">modes</dfn>. These are:
   2.101 +            Concurrent access to an <a>object store</a> MAY be isolated in one 
   2.102 +            of three <dfn title="mode">modes</dfn>. These are:
   2.103              <ol>
   2.104                <li><code>READ_ONLY</code></li>
   2.105                <li><code>READ_WRITE</code></li>
   2.106 @@ -215,48 +222,49 @@
   2.107              </ol>
   2.108            </p>
   2.109            <p>  
   2.110 -            Any number of <a title="reader">readers</a>
   2.111 -            MAY concurrently access an <a>object store</a>. A <a>writer</a> is not allowed
   2.112 -            if there is any <a>reader</a> concurrently accessing the <a>object store</a>,
   2.113 -            unless the <a>reader</a> is detached, i.e., looking at a snapshot view
   2.114 -            of the data that does not change once created. 
   2.115 +            Any number of <a title="reader">readers</a> MAY concurrently access 
   2.116 +            an <a>object store</a>. A <a>writer</a> is not allowed
   2.117 +            if there is any <a>reader</a> concurrently accessing the 
   2.118 +            <a>object store</a>, unless the <a>reader</a> is detached, i.e., 
   2.119 +            looking at a snapshot view of the data that does not change once 
   2.120 +            created. 
   2.121            </p>
   2.122            <!--div class="ednote">
   2.123              The detached reading behavior MAY need more explanation.
   2.124            </div-->
   2.125            <p>
   2.126 -            The <a><code>IDBObjectStore</code></a> interface provides access to the metadata
   2.127 -            of an <a>object store</a>.
   2.128 +            The <a><code>IDBObjectStore</code></a> interface provides access to 
   2.129 +            the metadata of an <a>object store</a>.
   2.130            </p>
   2.131            <dl title="interface IDBObjectStore" class="idl">
   2.132              <dt>const     unsigned short READ_WRITE    = 0</dt>
   2.133              <dd>Modification operations are allowed on the <a>object store</a>
   2.134              in this mode.</dd>
   2.135              <dt>const     unsigned short READ_ONLY    = 1</dt>
   2.136 -            <dd>Modification operations are not allowed on the <a>object store</a>
   2.137 -            in this mode.</dd>
   2.138 +            <dd>Modification operations are not allowed on the <a>object 
   2.139 +            store</a> in this mode.</dd>
   2.140              <dt>const     unsigned short SNAPSHOT_READ = 2</dt>
   2.141              <dd>This mode is used solely for reading from a snapshot of the data
   2.142              in the <a>object store</a>.</dd>
   2.143 -
   2.144              <dt>readonly attribute unsigned short mode</dt>
   2.145 -            <dd>On getting, provide the <a>mode</a> for isolating access to data inside
   2.146 -            this <a>object store</a></dd>
   2.147 +            <dd>On getting, provide the <a>mode</a> for isolating access to data 
   2.148 +            inside this <a>object store</a></dd>
   2.149              <dt>readonly attribute DOMString      name</dt>
   2.150              <dd>          
   2.151 -              On getting, provide the <a title="object store name">name</a> of this
   2.152 -              object store.        
   2.153 +              On getting, provide the <a title="object store name">name</a> of 
   2.154 +              this object store.        
   2.155              </dd>
   2.156              <dt>readonly attribute DOMString      keyPath</dt>
   2.157              <dd>
   2.158 -              On getting, provide the <a title="object store key path">key path</a>
   2.159 -              of this <a>object store</a>. If this attribute is <code>null</code>,
   2.160 +              On getting, provide the 
   2.161 +              <a title="object store key path">key path</a> of this 
   2.162 +              <a>object store</a>. If this attribute is <code>null</code>,
   2.163                the application MUST provide a key value for each modification operation.
   2.164              </dd>
   2.165              <dt>readonly attribute DOMStringList  indexNames</dt>
   2.166              <dd>
   2.167 -            On getting, provide a list of the names of <a title="index">indexes</a> on 
   2.168 -            objects in this <a>object store</a>.
   2.169 +            On getting, provide a list of the names of 
   2.170 +            <a title="index">indexes</a> on objects in this <a>object store</a>.
   2.171              </dd>
   2.172            </dl>
   2.173          </section> <!-- Object store -->
   2.174 @@ -264,33 +272,39 @@
   2.175          <section id="index-concept" class="section">
   2.176            <h4>Index</h4>
   2.177            <p>
   2.178 -            <a title="record">Records</a> in an <a>object store</a> can be retrieved using 
   2.179 -            the <a title="record">record's</a> key. However, that MAY not 
   2.180 -            always be adequate to recall <a title="record">records</a>. An <a>index</a> is
   2.181 -            used to lookup records in an <a>object store</a> other than through a
   2.182 +            <a title="record">Records</a> in an <a>object store</a> can be 
   2.183 +            retrieved using the <a title="record">record's</a> key. However, 
   2.184 +            that MAY not always be adequate to recall 
   2.185 +            <a title="record">records</a>. An <a>index</a> is used to lookup 
   2.186 +            records in an <a>object store</a> other than through a
   2.187              <a>record</a> key.
   2.188            </p>
   2.189            <p>
   2.190 -            An <dfn>index</dfn> is a specialized persistent store that holds key-value 
   2.191 -            pairs such that each value is the key of objects in the <dfn>referenced</dfn>
   2.192 -            <a>object store</a>. If an <a>index</a>'s <dfn>unique</dfn> flag is set, then
   2.193 -            it MUST NOT allow duplicate values for a key.
   2.194 -            Every <a>index</a> has a <dfn title="index name">name</dfn>.
   2.195 +            An <dfn>index</dfn> is a specialized persistent store that holds 
   2.196 +            key-value pairs such that each value is the key of objects in the 
   2.197 +            <dfn>referenced</dfn> <a>object store</a>. If an <a>index</a>'s 
   2.198 +            <dfn>unique</dfn> flag is set, then it MUST NOT allow duplicate 
   2.199 +            values for a key. Every <a>index</a> has a 
   2.200 +            <dfn title="index name">name</dfn>. Within an 
   2.201 +            <a>object store</a>, each <a>index</a> MUST have a
   2.202 +            <a title="valid-name">valid</a> and unique 
   2.203 +            <a title="index name">name</a>.
   2.204            </p>
   2.205            <p>
   2.206 -            If an <a>index</a> is <dfn>auto-populated</dfn>, then the user agent populates
   2.207 -            records using the values stored in the <a>referenced</a> <a>object store</a>.
   2.208 -            An <a>auto-populated</a> <a>index</a> MUST have a 
   2.209 -            <dfn title="index key path">key path</dfn>. This <a>key path</a> MUST be the
   2.210 -            name of an enumerated property of every object to be stored in the  
   2.211 -            <a>object store</a> <a>referenced</a> by that <a>index</a>. The 
   2.212 -            <a>auto-populated</a> <a>index</a> record 
   2.213 -            corresponding to an <a>object store</a> record MUST satisfy the following 
   2.214 -            <dfn>index maintenance conditions</dfn>:
   2.215 +            If an <a>index</a> is <dfn>auto-populated</dfn>, then the user agent 
   2.216 +            populates records using the values stored in the <a>referenced</a> 
   2.217 +            <a>object store</a>. An <a>auto-populated</a> <a>index</a> MUST have 
   2.218 +            a <dfn title="index key path">key path</dfn>. This <a>key path</a> 
   2.219 +            MUST be the name of an enumerated property of every object to be 
   2.220 +            stored in the <a>object store</a> <a>referenced</a> by that 
   2.221 +            <a>index</a>. The <a>auto-populated</a> <a>index</a> record 
   2.222 +            corresponding to an <a>object store</a> record MUST satisfy the 
   2.223 +            following <dfn>index maintenance conditions</dfn>:
   2.224            </p>
   2.225            <ul>
   2.226 -            <li><a>index</a> record key = value of the enumerated property at the 
   2.227 -            <a title="index key path">key path<a> in the <a>object store</a> record value</li>
   2.228 +            <li><a>index</a> record key = value of the enumerated property at 
   2.229 +            the <a title="index key path">key path<a> in the <a>object store</a> 
   2.230 +            record value</li>
   2.231              <li><a>index</a> record value = <a>object store</a> record key</li>
   2.232            </ul>
   2.233            <p>
   2.234 @@ -300,18 +314,20 @@
   2.235            <dl class="idl" title="interface IDBIndex">
   2.236              <dt>readonly attribute DOMString      name</dt>
   2.237              <dd>
   2.238 -              On getting, provide the <a title="index name">name</a> of this <a>index</a>.        
   2.239 +              On getting, provide the <a title="index name">name</a> of this 
   2.240 +              <a>index</a>.        
   2.241              </dd>
   2.242              <dt>readonly attribute DOMString      storeName</dt>
   2.243              <dd>
   2.244 -              On getting, provide the <a title="object store name">name</a> of this
   2.245 -              <a title="index">index's</a> <a>referenced</a> <a>object store</a>.
   2.246 +              On getting, provide the <a title="object store name">name</a> of 
   2.247 +              this <a title="index">index's</a> <a>referenced</a> 
   2.248 +              <a>object store</a>.
   2.249              </dd>
   2.250          
   2.251              <dt>readonly attribute DOMString      keyPath</dt>
   2.252              <dd>
   2.253 -              On getting, provide the <a title="index key path">key path<a> of this
   2.254 -              <a>index</a>. If this attribute is <code>null</code>,
   2.255 +              On getting, provide the <a title="index key path">key path<a> of 
   2.256 +              this <a>index</a>. If this attribute is <code>null</code>,
   2.257                this <a>index</a> is not <a>auto-populated</a>.
   2.258              </dd>
   2.259              
   2.260 @@ -325,66 +341,50 @@
   2.261         <section id="database-concept" class="section">
   2.262            <h4>Database</h4>
   2.263            <p>
   2.264 -            Each <a>origin</a> has an associated set of <a title="database">databases</a>. 
   2.265 -            A <dfn>database</dfn> comprises:
   2.266 -          </p>
   2.267 -          <ul>
   2.268 -            <li>
   2.269 -              one or more <a title="object store">object stores</a> and
   2.270 -            </li>
   2.271 -            <li>
   2.272 -              any number of <a title="index">indexes</a>.
   2.273 -            </li>
   2.274 -          </ul>
   2.275 -          <p>
   2.276 -            The <a title="object store">object stores</a> and 
   2.277 -            <a title="index">indexes</a> of a <a>database</a> are also referred as
   2.278 -            its <dfn>objects</dfn>.
   2.279 -          </p>
   2.280 +            Each <a>origin</a> has an associated set of 
   2.281 +            <a title="database">databases</a>. A <dfn>database</dfn> comprises
   2.282 +            one or more <a title="object store">object stores</a>.
   2.283            <p>
   2.284              Each <a>database</a> has a <a title="valid-name">valid</a> 
   2.285 -            <dfn title="database name">name</dfn> and a human readable description.
   2.286 -            A <dfn title="valid-name">valid name</dfn> is any string including
   2.287 -            the empty string. An exact match of names means that their 
   2.288 -            UTF-8 encodings are identical.
   2.289 +            <dfn title="database name">name</dfn> and a human readable 
   2.290 +            description. A <dfn title="valid-name">valid name</dfn> is any 
   2.291 +            string including the empty string. An exact match of names means 
   2.292 +            that their UTF-8 encodings are identical.
   2.293            </p>
   2.294            
   2.295            <div class="note">
   2.296 -            If an implementation does not support all sets of strings, it may implement
   2.297 -            support for arbitrary strings by mapping
   2.298 +            If an implementation does not support all sets of strings, it may 
   2.299 +            implement support for arbitrary strings by mapping
   2.300              database names (e.g. using a hashing algorithm) to the supported
   2.301              set of names.
   2.302            </div>
   2.303            <p>
   2.304 -          Each <a>database</a> also has a current <dfn>version</dfn>.
   2.305 +            Each <a>database</a> also has a current <dfn>version</dfn>.
   2.306            </p>
   2.307            <div class="note">
   2.308 -            Each <a>database</a> has one version at a time; a <a>database</a> can't
   2.309 -            exist in multiple versions at once. 
   2.310 +            Each <a>database</a> has one version at a time; a <a>database</a> 
   2.311 +            can't exist in multiple versions at once. 
   2.312            </div>
   2.313            <p>
   2.314 -            The <a>object store</a> <a title="object store name">name</a> and <a>index</a> 
   2.315 -            <a title="index name">name</a> MUST be <a title="valid-name">valid</a> and 
   2.316 -            unique within the <a>database</a>.
   2.317 +            The act of opening a <a>database</a> creates a database 
   2.318 +            <dfn>connection</dfn>. There MAY be multiple 
   2.319 +            <a title="connection">connections</a> to a given <a>database</a> 
   2.320 +            at any given time. A <a>connection</a> that is attempting to read a 
   2.321 +            given piece of data in a <a>database</a> is called a 
   2.322 +            <dfn>reader</dfn> and one that is attempting to write a piece of 
   2.323 +            data is called a <dfn>writer</dfn>. A <a>connection</a> MAY have 
   2.324 +            zero or one <dfn>active</dfn> <a>transaction</a>s.
   2.325            </p>
   2.326            <p>
   2.327 -            The act of opening a <a>database</a> is creates a <dfn>connection</dfn>. There
   2.328 -            MAY be multiple <a title="connection">connections</a> to a given <a>database</a> 
   2.329 -            at any given time. A <a>connection</a> that is attempting to read a given piece
   2.330 -            of data in a <a>database</a> is called a <dfn>reader</dfn> and one that is
   2.331 -            attempting to write a piece of data is called a <dfn>writer</dfn>. A
   2.332 -            <a>connection</a> MAY have zero or one <dfn>active</dfn> <a>transaction</a>s.
   2.333 -          </p>
   2.334 -          <p>
   2.335 -            An <a><code>IDBDatabase</code></a> object represents a <a>connection</a> to a 
   2.336 -            <a>database</a>. This API does not provide a way to enumerate the 
   2.337 -            <a title="database">databases</a> available for an <a>origin</a> from this API. 
   2.338 +            An <a><code>IDBDatabase</code></a> object represents a 
   2.339 +            <a>connection</a> to a <a>database</a>. 
   2.340            </p>
   2.341            
   2.342            <dl title="[NoInterfaceObject] interface IDBDatabase" class="idl">   
   2.343              <dt>readonly attribute DOMString name</dt>
   2.344              <dd>
   2.345 -              On getting, this attribute MUST return the <a title="database name">name</a>
   2.346 +              On getting, this attribute MUST return the 
   2.347 +              <a title="database name">name</a>
   2.348                of the <a title="connection">connected</a> <a>database</a>.
   2.349              </dd>
   2.350              <dt>readonly attribute DOMString description</dt>  
   2.351 @@ -396,7 +396,8 @@
   2.352              <dd>
   2.353                On getting, this attribute MUST return the <a>version</a> of this
   2.354                <a>database</a>. This attribute has the <a>null</a> value when the
   2.355 -              <a title="connection">connected</a> <a>database</a> is first created.
   2.356 +              <a title="connection">connected</a> <a>database</a> is first 
   2.357 +              created.
   2.358              </dd>
   2.359              <dt>readonly attribute DOMStringList objectStores</dt>
   2.360              <dd>
   2.361 @@ -404,11 +405,11 @@
   2.362                <a title="object store">object stores</a> currently in the 
   2.363                <a title="connection">connected</a> <a>database</a>.
   2.364              </dd>
   2.365 -            <dt>readonly attribute IDBTransaction currentTransaction</dt>
   2.366 +            <dt>readonly attribute IDBTransactionList transactions</dt>
   2.367              <dd>
   2.368 -              On getting, this attribute MUST return a <a><code>IDBTransaction</code></a> object
   2.369 -              corresponding to the <a>transaction</a> that is <a>active</a> in this
   2.370 -              <a>database</a> <a>connection</a>.
   2.371 +              On getting, this attribute MUST return a sequence of
   2.372 +              <a><code>IDBTransaction</code></a> objects
   2.373 +              corresponding to the <a>transactions</a> that are <a>active</a> in this <a>database</a> <a>connection</a>.
   2.374              </dd>
   2.375            </dl>
   2.376          </section>  <!-- IDBDatabase -->
   2.377 @@ -416,23 +417,26 @@
   2.378          <section class="section" id="range-concept">
   2.379            <h4>Key Range</h4>
   2.380            <p>
   2.381 -            An individual record can be retrieved from an <a>object store</a> using 
   2.382 -            either the record's key or the key applicable for some <a>index</a> that
   2.383 -            <a title="referenced">references</a> that <a>object store</a>. Multiple
   2.384 -            records can be fetched using a <a>key range</a>. A <dfn>key range</dfn> 
   2.385 -            is a continuous interval over some data type used for keys.
   2.386 +            An individual record can be retrieved from an <a>object store</a> 
   2.387 +            using either the record's key or the key applicable for some 
   2.388 +            <a>index</a> that <a title="referenced">references</a> that 
   2.389 +            <a>object store</a>. Multiple records can be fetched using a <a>key 
   2.390 +            range</a>. A <dfn>key range</dfn> is a continuous interval over some 
   2.391 +            data type used for keys.
   2.392            </p>
   2.393            <p>
   2.394 -            A <a>key range</a> MAY be left-bounded or right-bounded if there is a value
   2.395 -            that is, respectively, smaller than or larger than all its elements. A
   2.396 -            <a>key range</a> is said to be bounded if it is both left- and right-bounded
   2.397 -            and unbounded otherwise. A <dfn title="valid key range">valid</dfn>
   2.398 -            <a>key range</a> MUST be either half-bounded or bounded. A <a>key range</a>
   2.399 -            MAY be open, i.e., not including its endpoints or closed, i.e., including
   2.400 +            A <a>key range</a> MAY be left-bounded or right-bounded if there is 
   2.401 +            a value that is, respectively, smaller than or larger than all its 
   2.402 +            elements. A <a>key range</a> is said to be bounded if it is both 
   2.403 +            left- and right-bounded and unbounded otherwise. A 
   2.404 +            <dfn title="valid key range">valid</dfn> <a>key range</a> MUST be 
   2.405 +            either half-bounded or bounded. A <a>key range</a> MAY be open, 
   2.406 +            i.e., not including its endpoints or closed, i.e., including
   2.407              its endpoints. A <a>key range</a> MAY consist of a single value.
   2.408            </p>
   2.409            <p>
   2.410 -            The <a><code>IDBKeyRange</code></a> interface defines a <a>key range</a>.
   2.411 +            The <a><code>IDBKeyRange</code></a> interface defines a 
   2.412 +            <a>key range</a>.
   2.413            </p>
   2.414            <dl class="idl" title="[NoInterfaceObject] interface IDBKeyRange"> 
   2.415              <dt>const     unsigned short SINGLE = 0</dt>
   2.416 @@ -501,30 +505,31 @@
   2.417            <p>
   2.418              <a title="cursor">Cursors</a> are a transient mechanism used to 
   2.419              iterate over multiple records in a database. The storage operations
   2.420 -            are performed on the underlying <a>index</a> or an <a>object store</a>.
   2.421 +            are performed on the underlying <a>index</a> or an 
   2.422 +            <a>object store</a>.
   2.423            </p>
   2.424            
   2.425            <p>
   2.426 -            A <dfn>cursor</dfn> comprises a <dfn>range</dfn> of records in either an
   2.427 -            <a>index</a> or an <a>object store</a>. A <a title="cursor">cursor</a>
   2.428 -            maintains a <dfn>position</dfn> over this series, which moves in a
   2.429 -            <dfn>direction</dfn> that is either monotonically increasing or 
   2.430 -            decreasing order of the record keys. 
   2.431 +            A <dfn>cursor</dfn> comprises a <dfn>range</dfn> of records in 
   2.432 +            either an <a>index</a> or an <a>object store</a>. A 
   2.433 +            <a title="cursor">cursor</a> maintains a <dfn>position</dfn> over 
   2.434 +            this series, which moves in a <dfn>direction</dfn> that is either 
   2.435 +            monotonically increasing or decreasing order of the record keys. 
   2.436            </p>
   2.437            
   2.438            <dl title="[NoInterfaceObject] interface IDBCursor" class="idl">
   2.439              <dt>const     unsigned short     NEXT = 0</dt>
   2.440              <dd>
   2.441 -              indicates that this <a>cursor</a> should yield all records, including  
   2.442 -              duplicates and its <a>direction</a> is monotonically increasing 
   2.443 -              order of keys.
   2.444 +              indicates that this <a>cursor</a> should yield all records, 
   2.445 +              including duplicates and its <a>direction</a> is monotonically 
   2.446 +              increasing order of keys.
   2.447              </dd>
   2.448              <dt>const     unsigned short     NEXT_NO_DUPLICATE = 1</dt>
   2.449              <dd>
   2.450 -              indicates that this <a>cursor</a> should yield all records, not including
   2.451 -              duplicates and its <a>direction</a> is monotonically increasing 
   2.452 -              order of keys. For every key with duplicate values, only the first
   2.453 -              record is yielded.
   2.454 +              indicates that this <a>cursor</a> should yield all records, not 
   2.455 +              including duplicates and its <a>direction</a> is monotonically 
   2.456 +              increasing order of keys. For every key with duplicate values, 
   2.457 +              only the first record is yielded.
   2.458              </dd>
   2.459              <dt>const     unsigned short     PREV = 2</dt>
   2.460              <dd>
   2.461 @@ -534,10 +539,10 @@
   2.462              </dd>
   2.463              <dt>const     unsigned short     PREV_NO_DUPLICATE = 3</dt>
   2.464              <dd>
   2.465 -              indicates that this <a>cursor</a> should yield all records, not including
   2.466 -              duplicates and its <a>direction</a> is monotonically decreasing 
   2.467 -              order of keys. For every key with duplicate values, only the first
   2.468 -              record is yielded.
   2.469 +              indicates that this <a>cursor</a> should yield all records, not 
   2.470 +              including duplicates and its <a>direction</a> is monotonically 
   2.471 +              decreasing order of keys. For every key with duplicate values, 
   2.472 +              only the first record is yielded.
   2.473              </dd>
   2.474  
   2.475              <dt>readonly attribute unsigned short     direction</dt>
   2.476 @@ -550,40 +555,50 @@
   2.477          <section id="transaction-concept" class="section">
   2.478            <h4>Transaction</h4>
   2.479            <p>
   2.480 -            A <dfn>transaction</dfn> has a <dfn>scope</dfn> and a <a>database</a>.
   2.481 -            A <a>transaction</a>'s <a>scope</a> is either <dfn>static</dfn>
   2.482 -            or <dfn>dynamic</dfn>. If the scope is <a>static</a>, it can cover 
   2.483 -            either all the <a>object store</a>s and <a>index</a>es in a 
   2.484 -            <a>database</a> or it MAY include a subset of them.
   2.485 -          </p>
   2.486 -          <p>
   2.487 -            A <a>connection</a> MAY have at most one <a>transaction</a> at any
   2.488 -            given time. Moreover, there MAY not be any overlap among the
   2.489 -            <a>scope</a>s of all open <a title="connection">connections</a>
   2.490 -            to a given <a>database</a>.
   2.491 +            A <dfn>transaction</dfn> is defined on a <a>database</a>. A 
   2.492 +            <a>transaction</a>'s <a>scope</a> is either 
   2.493 +            <dfn>static</dfn> or <dfn>dynamic</dfn> and it MAY include a subset of the <a>object store</a>s of the <a>transaction</a>'s 
   2.494 +            <a>database</a>. If the <a>scope</a> is <a>static</a>, then it MAY 
   2.495 +            be <dfn>global</dfn>, meaning that it includes every existing and 
   2.496 +            to be created <a>object store</a>s of the <a>database</a>. There MAY 
   2.497 +            not be any overlap among the <a>scope</a>s of all open 
   2.498 +            <a title="connection">connections</a> to a given <a>database</a>.
   2.499            </p>
   2.500            <p>
   2.501              <a title="transaction">Transactions</a> offer some protection from 
   2.502              application and system failures. A <a>transaction</a> MAY be used to
   2.503              store multiple data records or to conditionally modify certain data 
   2.504 -            records. A <a>transaction</a> represents an atomic and durable set of 
   2.505 -            data access and mutation operations. 
   2.506 +            records. A <a>transaction</a> represents an atomic and durable set 
   2.507 +            of data access and mutation operations. 
   2.508            </p>
   2.509 -          
   2.510            <p>  
   2.511              <a title="transaction">Transactions</a> are expected to be short
   2.512 -            lived. Conforming user agents MAY terminate 
   2.513 -            <a title="transaction">transactions</a> that take too long to
   2.514 -            complete in order to free up storage resources that are locked by
   2.515 -            a long running <a>transaction</a>.
   2.516 +            lived. A <a>transaction</a> may be programmatically committed or 
   2.517 +            aborted. Unless a <a>transaction</a> is programmatically committed 
   2.518 +            or aborted, conforming user agents MUST automatically:
   2.519            </p>
   2.520 +          <ul>
   2.521 +            <li>
   2.522 +            commit a <a>transaction</a> at the end of the scope in
   2.523 +            which it was created unless there is an active operation being 
   2.524 +            performed using that transaction, in which case, the transaction is 
   2.525 +            automatically committed when that operation is completed. 
   2.526 +            </li>
   2.527 +            <li>
   2.528 +            abort a <a>transaction</a> at the end of the scope in which it was 
   2.529 +            created, if an exception is propagated to that scope.
   2.530 +            </li>
   2.531 +          </ul>
   2.532            <dl class="idl" title="interface IDBTransaction">
   2.533 -          	<dt>attribute boolean static</dt>
   2.534 -          	<dd>If <code>true</code>, then this <a>transaction</a> is <a>static</a>
   2.535 -          	and <code>false</code> otherwise.
   2.536 -          	<dt>attribute IDBDatabase db</dt>
   2.537 -          	<dd>The <a>database</a> <a>connection</a> of which this <a>transaction</a>
   2.538 -          	is a part</dd>
   2.539 +            <dt>attribute boolean static</dt>
   2.540 +            <dd>If <code>true</code>, then this <a>transaction</a> is 
   2.541 +            <a>static</a> and <code>false</code> otherwise.
   2.542 +            <dt>attribute IDBDatabase db</dt>
   2.543 +            <dd>The <a>database</a> <a>connection</a> of which this 
   2.544 +            <a>transaction</a> is a part</dd>
   2.545 +            <dt>attribute DOMStringList scope</dt>
   2.546 +            <dd>The names of <a>object store</a>s that are included in the scope 
   2.547 +            of this <a>transaction</a></dd>
   2.548            </dl>
   2.549          </section> <!-- IDBTransaction -->
   2.550        </section>  
     3.1 --- a/Speclet_021_IDB_API_Algorithms.html	Thu Jun 17 12:31:27 2010 -0700
     3.2 +++ b/Speclet_021_IDB_API_Algorithms.html	Tue Jun 22 00:59:36 2010 +0800
     3.3 @@ -137,15 +137,15 @@
     3.4          <section class="section" id="opening">
     3.5            <h4>Opening the database</h4>
     3.6            <p>
     3.7 -            The <dfn>steps for opening a database</dfn> are as follows. These steps
     3.8 -            MUST be run with an origin, a database name and description. All the 
     3.9 -            steps MUST be run atomically:
    3.10 +            The <dfn>steps for opening a database</dfn> are as follows. These 
    3.11 +            steps MUST be run with an origin, a database name and an optional
    3.12 +            description. All the steps MUST be run atomically:
    3.13            </p>
    3.14            
    3.15            <ol>
    3.16              <li>
    3.17                If there is already a database with the given name from the origin
    3.18 -              <var>origin</var>, then let <var>db</var> be that database.
    3.19 +              <var>origin</var>, then let <var>db</var> be that database. If a description is passed to these steps, set the description of <var>db</var> to that.
    3.20              </li>
    3.21              
    3.22              <li>
    3.23 @@ -192,11 +192,15 @@
    3.24              </li>
    3.25              <li>
    3.26                If <var>key</var> is not defined or null, then perform the 
    3.27 -              following steps.              
    3.28 +              following steps.
    3.29                <ol>
    3.30                  <li>
    3.31 -                  Using <var>store</var>'s <a>key generator</a>, produce the next
    3.32 -                  key and store it as <var>key</var>.
    3.33 +                  If <var>store</var> does not have a <a>key generator</a>, then 
    3.34 +                  terminate these steps and set error code <a class="idlType" href="#widl-IDBDatabaseException-NOT_ALLOWED_ERR"><code>NOT_ALLOWED_ERR</code></a>.
    3.35 +                </li>
    3.36 +                <li>
    3.37 +                  Using <var>store</var>'s <a>key generator</a>, produce the 
    3.38 +                  next key and store it as <var>key</var>.
    3.39                  </li>
    3.40                  <li>
    3.41                    If <var>store</var> uses <a>in-line keys</a>, then store 
    3.42 @@ -373,8 +377,8 @@
    3.43              </li>            
    3.44              <li>
    3.45                 If any <a title="index">indexes</a> are <a>auto-populated</a> for
    3.46 -               <var>store</var>, then remove the record in that index according to
    3.47 -               <a>index maintenance conditions</a>.
    3.48 +               <var>store</var>, then remove the record in that index according 
    3.49 +               to <a>index maintenance conditions</a>.
    3.50              </li>
    3.51              
    3.52              <li>
    3.53 @@ -409,60 +413,57 @@
    3.54            <p>
    3.55              When the user agent is to <dfn>create a <a>transaction</a></dfn>
    3.56              it MUST run the following steps. These steps MUST be run with 
    3.57 -            two parameters - <a>database</a> and an optional list of names of 
    3.58 -            <a>database</a> <a>objects</a> to be reserved.
    3.59 +            two parameters - <a>database</a>, an optional global flag, and an 
    3.60 +            optional list of names of <a>database</a> <a>objects</a> to be 
    3.61 +            reserved.
    3.62            </p>
    3.63            
    3.64            <ol>
    3.65              <li>
    3.66 -              If the <a>database</a> passed to these steps has an <a>active</a>
    3.67 +              If the global flag passed to these steps is set, and the 
    3.68 +              <a>database</a> passed to these steps has an <a>active</a>
    3.69                <a>transaction</a>, then terminate these steps and set error code
    3.70                <a class="idlType" href="#widl-IDBDatabaseException-NON_TRANSIENT_ERR"><code>NON_TRANSIENT_ERR</code></a>.
    3.71              </li>
    3.72              <li>
    3.73                Pick the appropriate steps:
    3.74                <dl class="switch">
    3.75 -                <dt>If these steps are not called with a list of database objects</dt>
    3.76 +                <dt>If these steps are called with the global flag set</dt>
    3.77                  <dd>Acquire a lock on the entire database.</dd>
    3.78 -                <dt>If these steps are called with a non-empty list of database objects</dt>
    3.79 -                <dd><ol>
    3.80 -                  <li>
    3.81 -                    If any of the objects in this array is not a database object,
    3.82 -                    then set <var>code</var> to <a class="idlType" href="#widl-IDBDatabaseException-NON_TRANSIENT_ERR"><code>NON_TRANSIENT_ERR</code></a>
    3.83 -                    and jump to the last step.
    3.84 -                  </li>
    3.85 -                  <li>
    3.86 -                    Acquire appropriate locks on each of the database objects and
    3.87 -                    the objects they depend on in an ordered sequence. 
    3.88 +                <dt>If these steps are called with a non-empty list of <a>object store</a> <a title="object store name">name</a>s</dt>
    3.89 +                <dd>
    3.90 +                    Acquire appropriate locks on each of the named 
    3.91 +                    <a>object store</a> in an ordered sequence. 
    3.92                      <div class="note">
    3.93 -                      If the database does not allow fine grained locking,
    3.94 -                      then a user agent MAY obtain a shared or exclusive lock on the database.
    3.95 +                      A user agent MAY obtain a shared or exclusive lock on 
    3.96 +                      the database if it does not perform fine grained locking.
    3.97                      </div>
    3.98 -                  </li>
    3.99 -                </ol></dd>
   3.100 -                <dt>If these steps are called with an empty array of database objects</dt>
   3.101 +                </dd>
   3.102 +                <dt>If these steps are called with an empty list of <a>object store</a> <a title="object store name">name</a>s</dt>
   3.103                  <dd>
   3.104 -                    Do not acquire locks on any database objects now. Locks are obtained as
   3.105 -                    the application attempts to access those objects.
   3.106 +                    Do not acquire locks on any database objects now. Locks are 
   3.107 +                    obtained as the application attempts to access those 
   3.108 +                    objects.
   3.109                      <div class="note">
   3.110 -                      Using the database in this style MAY lead to deadlocks. Programmers
   3.111 -                      MUST use caution to acquire and release database objects in the same
   3.112 -                      global order to avoid deadlocks.
   3.113 +                      Using the database in this style MAY lead to deadlocks. Programmers are advised to use caution to acquire and 
   3.114 +                      release object stores in the same global order to avoid 
   3.115 +                      deadlocks.
   3.116                      </div>
   3.117                  </dd>
   3.118                </dl>
   3.119              </li>
   3.120  
   3.121              <li>
   3.122 -              If a timeout duration is passed to these steps and is exceeded when 
   3.123 -              acquiring locks, then set <var>code</var> to 
   3.124 +              If a timeout duration is passed to these steps and is exceeded 
   3.125 +              when acquiring locks, then set <var>code</var> to 
   3.126                <a class="idlType" href="#widl-IDBDatabaseException-TIMEOUT_ERR"><code>TIMEOUT_ERR</code></a> and jump to the last step.
   3.127              </li>
   3.128  
   3.129              <li>
   3.130                Open a new transaction to the database, and create a
   3.131                <code><a>IDBTransaction</a></code> object
   3.132 -              that represents that transaction. Let <var>transaction</var> be this object.
   3.133 +              that represents that transaction. Let <var>transaction</var> be 
   3.134 +              this object.
   3.135              </li>
   3.136              
   3.137              <li>
     4.1 --- a/Speclet_022_IDB_API_Synchronous_APIs.html	Thu Jun 17 12:31:27 2010 -0700
     4.2 +++ b/Speclet_022_IDB_API_Synchronous_APIs.html	Tue Jun 22 00:59:36 2010 +0800
     4.3 @@ -145,7 +145,7 @@
     4.4            </p>
     4.5            
     4.6            <dl class="idl" title="[NoInterfaceObject] interface IDBEnvironmentSync">
     4.7 -            <dt>readonly attribute IDBFactory indexedDB</dt>
     4.8 +            <dt>readonly attribute IDBFactory indexedDBSync</dt>
     4.9              <dd>This attribute provides applications a mechanism for accessing
    4.10                capabilities of indexed databases.</dd>
    4.11            </dl>
    4.12 @@ -158,8 +158,6 @@
    4.13                  <dd>The <a title="database name">name</a> for the <a>database</a></dd>
    4.14                  <dt>DOMString description</dt>
    4.15                  <dd>The description for the <a>database</a></dd>
    4.16 -                <dt>optional boolean modifyDatabase</dt>
    4.17 -                <dd>This defaults to true</dd>
    4.18                </dl>
    4.19                <dl class="exception" title="IDBDatabaseException">
    4.20                  <dt>UNKNOWN_ERR</dt>
    4.21 @@ -853,6 +851,22 @@
    4.22              to reserve the required <a>database</a> <a>objects</a>.
    4.23            </p>
    4.24            <dl class="idl" title="[NoInterfaceObject] interface IDBTransactionSync : IDBTransaction">
    4.25 +            <dt>IDBObjectStoreSync objectStore()</dt>
    4.26 +            <dd>
    4.27 +              Immediately returns the object store that has been already added 
    4.28 +              to the <a>scope</a> of this <a>transaction</a>. 
    4.29 +              <dl class="parameters">
    4.30 +                <dt>DOMString name</dt>
    4.31 +                <dd>The requested <a>object store</a></dd>
    4.32 +              </dl>
    4.33 +              <dl class="exception" title="IDBDatabaseException">
    4.34 +                <dt><a class="idlType" href="#widl-IDBDatabaseException-NOT_FOUND_ERR"><code>NOT_FOUND_ERR</code></a></dt>
    4.35 +                <dd>
    4.36 +                If the requested <a>object store</a> is not in this 
    4.37 +                <a>transaction</a>'s <a>scope</a>.
    4.38 +                </dd>
    4.39 +              </dl>
    4.40 +            </dd>
    4.41              <dt>void abort()</dt>
    4.42              <dd>
    4.43                This method signals the need to cancel the effects of
     5.1 --- a/Speclet_023_IDB_API_Asynchronous_APIs.html	Thu Jun 17 12:31:27 2010 -0700
     5.2 +++ b/Speclet_023_IDB_API_Asynchronous_APIs.html	Tue Jun 22 00:59:36 2010 +0800
     5.3 @@ -158,6 +158,12 @@
     5.4              <dd>Returns the result of the successful completion of an asynchronous request
     5.5              on the <a class="idlType" href="#widl-IDBEvent-source"><code>source</code></a>.</dd>
     5.6            </dl>
     5.7 +          <dl class="idl" title="[NoInterfaceObject] interface IDBTransactionEvent : IDBSuccessEvent"> 
     5.8 +            <dt>readonly attribute IDBTransaction transaction</dt>
     5.9 +            <dd>Returns the transaction used for the request 
    5.10 +            on the <a class="idlType" href="#widl-IDBEvent-source"><code>source</code></a>.</dd>
    5.11 +          </dl>
    5.12 +
    5.13            <dl class="idl" title="[NoInterfaceObject] interface IDBErrorEvent : IDBEvent"> 
    5.14              <dt>readonly attribute unsigned short code</dt>
    5.15              <dd>Returns the most appropriate error code from carrying out the asynchronous request
    5.16 @@ -201,8 +207,6 @@
    5.17              If the request aborts successfully, the
    5.18              <a class="idlType" href="#widl-IDBRequest-error"><code>error</code></a> is set
    5.19              to <a class="idlType" href="#widl-IDBDatabaseException-UNKNOWN_ERR"><code>UNKNOWN_ERR</code></a>.</dd>
    5.20 -            <dt>const     unsigned short INITIAL = 0</dt>
    5.21 -            <dd>This state indicates that a request has not been started.</dd>
    5.22              <dt>const     unsigned short LOADING = 1</dt>
    5.23              <dd>This state indicates that a request has been started but its results is not
    5.24              yet available.</dd>
    5.25 @@ -259,15 +263,46 @@
    5.26              <thead><tr>
    5.27                <th><span>Event handler</span> </th>
    5.28                <th><span>Event handler event type</span></th>
    5.29 +              <th><span>Event interface(s)</span></th>
    5.30              </tr></thead>
    5.31              <tbody>
    5.32                <tr>
    5.33                  <td><dfn id="handler-request-onsuccess"><code>onsuccess</code></dfn> </td>
    5.34                  <td> <code><dfn title="event-success">success</dfn></td>
    5.35 +                <td> <a class="idlType" href="#widl-IDBSuccessEvent"><code>IDBSuccessEvent</code></a>,
    5.36 +                <a class="idlType" href="#widl-IDBTransactionEvent"><code>IDBTransactionEvent</code></a></td>
    5.37                </tr>
    5.38                <tr>
    5.39                  <td><dfn id="handler-request-onerror"><code>onerror</code></dfn> </td>
    5.40                  <td> <code><dfn title="event-error">error</dfn></code></td>
    5.41 +                <td> <a class="idlType" href="#widl-IDBErrorEvent"><code>IDBErrorEvent</code></a></td>
    5.42 +              </tr>
    5.43 +            </tbody>
    5.44 +          </table>        
    5.45 +
    5.46 +          <p>
    5.47 +            The following are the <span>event handlers</span> (and their corresponding 
    5.48 +            <span>event handler event types</span>) that MUST be supported, as IDL
    5.49 +            attributes, by objects implementing the <a><code>IDBTransactionRequest</code></a> interface:
    5.50 +          </p>
    5.51 +          
    5.52 +          <table>
    5.53 +            <thead><tr>
    5.54 +              <th><span>Event handler</span> </th>
    5.55 +              <th><span>Event handler event type</span></th>
    5.56 +            </tr></thead>
    5.57 +            <tbody>
    5.58 +              <tr>
    5.59 +                <td><dfn id="handler-request-oncomplete"><code>oncomplete</code></dfn> </td>
    5.60 +                <td> <code><dfn title="event-complete">complete</dfn></td>
    5.61 +              </tr>
    5.62 +              <tr>
    5.63 +                <td><dfn id="handler-request-onabort"><code>onabort</code></dfn> </td>
    5.64 +                <td> <code><dfn title="event-abort">abort</dfn></code></td>
    5.65 +              </tr>
    5.66 +              <tr>
    5.67 +                <td><dfn id="handler-request-ontimeout"><code>ontimeout</code></dfn> </td>
    5.68 +                <td> <code><dfn title="event-timeout">timeout</dfn></code></td>
    5.69                </tr>
    5.70              </tbody>
    5.71            </table>        
    5.72 @@ -276,10 +311,12 @@
    5.73          <section class="section" id="requests">
    5.74            <h4>Asynchronous Request API</h4>
    5.75           <p>
    5.76 -            <a title="Window"><a class="externalDFN"><code>Window</code></a> objects MUST implement the 
    5.77 -            <a><code>IDBEnvironment</code></a> interface.
    5.78 +            <a title="Window"><a class="externalDFN"><code>Window</code></a> and 
    5.79 +            <a title="Worker"><a class="externalDFN"><code>Worker</code></a> objects 
    5.80 +            MUST implement the <a><code>IDBEnvironment</code></a> interface.
    5.81            </p>
    5.82            <p class="idl" title="Window implements IDBEnvironment">
    5.83 +          <p class="idl" title="Worker implements IDBEnvironment">
    5.84            </p>
    5.85            
    5.86            <dl class="idl" title="[NoInterfaceObject] interface IDBEnvironment">
    5.87 @@ -295,6 +332,10 @@
    5.88              or <a title="objects">object</a> handle at a time. 
    5.89            </p>
    5.90            <dl class="idl" title="[NoInterfaceObject] interface IDBFactoryRequest">
    5.91 +            <dt>readonly attribute DOMStringList databases</dt>
    5.92 +            <dd>
    5.93 +            This value is the list of the names of databases available in the global scope object.
    5.94 +            </dd>
    5.95              <dt>IDBRequest open()</dt>
    5.96              <dd>
    5.97                <p>
    5.98 @@ -312,37 +353,35 @@
    5.99      
   5.100                <ol>
   5.101                  <li>
   5.102 -                  Let <var>origin</var> be the origin of the active document from which
   5.103 -                  the method was invoked.                
   5.104 +                  Let <var>origin</var> be the origin of the active document 
   5.105 +                  from which the method was invoked.                
   5.106                  </li>
   5.107                  <li>
   5.108 -                  Perform the <a>steps for opening a database</a>, with <var>origin</var>,
   5.109 -                  the <var>name</var> parameter and <var>description</var> parameter, and 
   5.110 -                  call its result as <var>result</var>.
   5.111 +                  Perform the <a>steps for opening a database</a>, with 
   5.112 +                  <var>origin</var>, the <var>name</var> parameter and 
   5.113 +                  <var>description</var> parameter, and call its result as 
   5.114 +                  <var>result</var>.
   5.115                  </li>
   5.116                  <li>
   5.117 -                  If the steps were aborted with an error code, then set this request's
   5.118 -                  <a class="idlType" href="#widl-IDBRequest-error"><code>error</code></a> with that code 
   5.119 -                  and abort these steps.
   5.120 +                  If the steps were aborted with an error code, then set this 
   5.121 +                  request's <a class="idlType" href="#widl-IDBRequest-error"><code>error</code></a> with that 
   5.122 +                  code and abort these steps.
   5.123                  </li>
   5.124                  <li>
   5.125 -                  Create a <a><code>IDBDatabaseRequest</code></a> object for <var>result</var>
   5.126 -                  and call it <var>db</var>.
   5.127 +                  Create a <a><code>IDBDatabaseRequest</code></a> object for 
   5.128 +                  <var>result</var> and call it <var>db</var>.
   5.129                  </li>
   5.130                  <li>
   5.131 -                  Fire a <a title="event-success">success event</a> on this method's
   5.132 -                  returned object with its 
   5.133 -                  <a class="idlType" href="#widl-IDBSuccessEvent-result"><code>result</code></a> set
   5.134 -                  to <var>db</var>.
   5.135 +                  Fire a <a title="event-success">success event</a> on this 
   5.136 +                  method's returned object using the <a><code>IDBSuccessEvent</code></a> interface with its 
   5.137 +                  <a class="idlType" href="#widl-IDBSuccessEvent-result"><code>result</code></a> 
   5.138 +                  set to <var>db</var>.
   5.139                </ol>              
   5.140                <dl class="parameters">
   5.141                  <dt>DOMString name</dt>
   5.142                  <dd>The <a title="database name">name</a> for the <a>database</a></dd>
   5.143                  <dt>DOMString description</dt>
   5.144                  <dd>The description for the <a>database</a></dd>
   5.145 -                <!-- TODO Jonas wants to take this out-->
   5.146 -                <dt>optional boolean modifyDatabase</dt>
   5.147 -                <dd>This defaults to true</dd>
   5.148                </dl>
   5.149                <dl class="exception" title="IDBDatabaseException">
   5.150                  <dt>NON_TRANSIENT_ERR</dt>
   5.151 @@ -354,10 +393,16 @@
   5.152              <dt>IDBRequest createObjectStore()</dt>
   5.153              <dd>
   5.154                <p>
   5.155 -                This method returns immediately and creates a new <a>object store</a>
   5.156 -                with the given name in the <a title="connection">connected</a> 
   5.157 -                <a>database</a>. If an <a>object store</a> with the same name, compared
   5.158 -                in a case-sensitive manner, already exists in the 
   5.159 +                This method returns immediately and creates a new <a>object 
   5.160 +                store</a> with the given name in the 
   5.161 +                <a title="connection">connected</a> <a>database</a>. If the specified <a>transaction</a> does not have <a>global</a> <a>scope</a>, then an  
   5.162 +                <a title="event-error">error event</a> is fired on this method's
   5.163 +                returned object with its <a class="idlType" href="#widl-IDBErrorEvent-code"><code>code</code></a>
   5.164 +                set to <a class="idlType" href="#widl-IDBDatabaseException-NOT_ALLOWED_ERR"><code>NOT_ALLOWED_ERR</code></a>
   5.165 +                and a suitable 
   5.166 +                <a class="idlType" href="#widl-IDBErrorEvent-message"><code>message</code></a>.
   5.167 +                <a>object store</a> with the same name, compared in a 
   5.168 +                case-sensitive manner, already exists in the 
   5.169                  <a title="connection">connected</a> <a>database</a>, then an
   5.170                  <a title="event-error">error event</a> is fired on this method's
   5.171                  returned object with its <a class="idlType" href="#widl-IDBErrorEvent-code"><code>code</code></a>
   5.172 @@ -365,17 +410,20 @@
   5.173                  and a suitable 
   5.174                  <a class="idlType" href="#widl-IDBErrorEvent-message"><code>message</code></a>.
   5.175                  If the <a>object store</a> is created successfully, then a
   5.176 -                <a title="event-success">success event</a> is fired on this method's
   5.177 -                returned object with its 
   5.178 +                <a title="event-success">success event</a> is fired on this 
   5.179 +                method's returned object using the <a><code>IDBTransactionEvent</code></a> interfacewith its 
   5.180                  <a class="idlType" href="#widl-IDBSuccessEvent-result"><code>result</code></a> set
   5.181 -                to a new <a><code>IDBObjectStoreRequest</code></a> for that <a>object store</a>.
   5.182 +                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
   5.183 +                to the <a>transaction</a> passed to this method.
   5.184                </p>
   5.185                <dl class="parameters">
   5.186 +                <dt>IDBTransaction txn</dt>
   5.187 +                <dd>An active <a>transaction</a> open in this <a>database</a> <a>connection</a> whose <a>scope</a> is <a>static</a> and <a>global</a></dd>
   5.188                  <dt>DOMString name</dt>
   5.189                  <dd>The <a title="object store name">name</a> of a new <a>object store</a></dd>
   5.190                  <dt>[TreatNullAs=EmptyString] optional DOMString keyPath</dt>
   5.191                  <dd>The <a title="object store key path">key path</a> of a new 
   5.192 -                <a>object store</a>. If <a>null</a> path is specified, then the 
   5.193 +                <a>object store</a>. If <a>empty</a> path is specified, then the 
   5.194                  <a>object store</a> created will not have a <a>key path</a> and will
   5.195                  use <a>out-of-line keys</a>.</dd>
   5.196                  <dt>optional boolean autoIncrement</dt>
   5.197 @@ -383,13 +431,43 @@
   5.198                  <a>key generator</a>. This defaults to <code>true</code>.</dd>
   5.199                </dl>
   5.200              </dd>
   5.201 +            <dt>IDBRequest objectStore()</dt>
   5.202 +            <dd>
   5.203 +              This method implicitly creates a <a>transaction</a> and opens the 
   5.204 +              <a>object store</a> with the given name in the 
   5.205 +              <a title="connection">connected</a> <a>database</a> as the
   5.206 +              <a>transaction</a>'s <a>static</a> <a>scope</a>.
   5.207 +              If the <a>object store</a> is opened, then a
   5.208 +              <a title="event-success">success event</a> is fired on this method's
   5.209 +              returned object using the <a><code>IDBTransactionEvent</code></a> 
   5.210 +              interface with its 
   5.211 +              <a class="idlType" href="#widl-IDBSuccessEvent-result"><code>result</code></a> set to a new 
   5.212 +              <a><code>IDBObjectStoreRequest</code></a> for that <a>object store</a> and  <a class="idlType" href="#widl-IDBTransactionEvent-transaction"><code>transaction</code></a> 
   5.213 +              set to a new <code>IDBTransactionRequest</code> for the 
   5.214 +              implicit <a>transaction</a>.
   5.215 +              <dl class="parameters">
   5.216 +                <dt>DOMString name</dt>
   5.217 +                <dd>The <a title="object store name">name</a> of an existing 
   5.218 +                <a>object store</a></dd>
   5.219 +                <dt>optional unsigned short mode</dt>
   5.220 +                <dd>The <a>mode</a> used to access the <a>object store</a>, which defaults to 
   5.221 +                <a class="idlType" href="#widl-IDBDatabaseObjectStore-READ_ONLY"><code>READ_ONLY</code></a>.</dd>
   5.222 +                <dt>optional unsigned long timeout</dt>
   5.223 +                <dd>The interval which this operation is allowed to take to
   5.224 +                reserve all the <a>database</a> objects identified in the new
   5.225 +                <a title="transaction">transaction's</a> <a>scope</a>. The default
   5.226 +                is user agent specific.</dd>
   5.227 +              </dl>
   5.228 +            </dd>
   5.229              <dt>IDBRequest openObjectStore()</dt>
   5.230              <dd>
   5.231                <p>
   5.232 -                This method returns immediately and opens the <a>object store</a> with 
   5.233 -                the given name in the <a title="connection">connected</a> <a>database</a>
   5.234 -                for the <a>mode</a> specified. If an <a>object store</a> with the given
   5.235 -                name does not exist in the <a title="connection">connected</a> <a>database</a>, 
   5.236 +                This method returns immediately and opens the 
   5.237 +                <a>object store</a> with the given name in the 
   5.238 +                <a title="connection">connected</a> <a>database</a>
   5.239 +                for the <a>mode</a> specified. If an <a>object store</a> with 
   5.240 +                the given name does not exist in the 
   5.241 +                <a title="connection">connected</a> <a>database</a>, 
   5.242                  then an
   5.243                  <a title="event-error">error event</a> is fired on this method's
   5.244                  returned object with its 
   5.245 @@ -399,26 +477,37 @@
   5.246                  <a class="idlType" href="#widl-IDBErrorEvent-message"><code>message</code></a>.
   5.247                  If the <a>object store</a> is opened, then a
   5.248                  <a title="event-success">success event</a> is fired on this method's
   5.249 -                returned object with its 
   5.250 +                returned object using the <a><code>IDBTransactionEvent</code></a> 
   5.251 +                interface with its 
   5.252                  <a class="idlType" href="#widl-IDBSuccessEvent-result"><code>result</code></a> set to a new 
   5.253 -                <a><code>IDBObjectStoreRequest</code></a> for that <a>object store</a>.
   5.254 +                <a><code>IDBObjectStoreRequest</code></a> for that <a>object store</a> and <a class="idlType" href="#widl-IDBTransactionEvent-transaction"><code>transaction</code></a> set
   5.255 +                to the <a>transaction</a> passed to this method.
   5.256                </p>              
   5.257                <dl class="parameters">
   5.258                  <dt>DOMString name</dt>
   5.259                  <dd>The <a title="object store name">name</a> of an existing 
   5.260                  <a>object store</a></dd>
   5.261 +                <dt>IDBTransaction txn</dt>
   5.262 +                <dd>An active <a>transaction</a> open in this <a>database</a> <a>connection</a></dd> 
   5.263                  <dt>optional unsigned short mode</dt>
   5.264 -                <dd>The <a>mode</a> used to access the <a>object store</a></dd>
   5.265 +                <dd>The <a>mode</a> used to access the <a>object store</a>, which defaults to 
   5.266 +                <a class="idlType" href="#widl-IDBDatabaseObjectStore-READ_ONLY"><code>READ_ONLY</code></a>.</dd>
   5.267                </dl>
   5.268              </dd>
   5.269              <dt>IDBRequest removeObjectStore()</dt>
   5.270              <dd>
   5.271                <p>
   5.272 -                This method returns immediately and destroys the <a>object store</a>
   5.273 -                with the given name in the <a title="connection">connected</a> 
   5.274 -                <a>database</a> as well as all <a title="index">indexes</a> that are 
   5.275 -                <a title="referenced">referencing</a> that <a>object store</a>. If an 
   5.276 -                <a>object store</a> with the given name does not exist in the 
   5.277 +                This method returns immediately and destroys the 
   5.278 +                <a>object store</a> with the given name in the 
   5.279 +                <a title="connection">connected</a> <a>database</a> as well as 
   5.280 +                all <a title="index">indexes</a> that are 
   5.281 +                <a title="referenced">referencing</a> that <a>object store</a>. If the specified <a>transaction</a> does not have <a>global</a> <a>scope</a>, then an  
   5.282 +                <a title="event-error">error event</a> is fired on this method's
   5.283 +                returned object with its <a class="idlType" href="#widl-IDBErrorEvent-code"><code>code</code></a>
   5.284 +                set to <a class="idlType" href="#widl-IDBDatabaseException-NOT_ALLOWED_ERR"><code>NOT_ALLOWED_ERR</code></a>
   5.285 +                and a suitable 
   5.286 +                <a class="idlType" href="#widl-IDBErrorEvent-message"><code>message</code></a>. If 
   5.287 +                an <a>object store</a> with the given name does not exist in the 
   5.288                  <a title="connection">connected</a> <a>database</a>, 
   5.289                  then an
   5.290                  <a title="event-error">error event</a> is fired on this method's
   5.291 @@ -427,9 +516,19 @@
   5.292                  <a class="idlType" href="#widl-IDBDatabaseException-NOT_FOUND_ERR"><code>NOT_FOUND_ERR</code></a>
   5.293                  and a suitable 
   5.294                  <a class="idlType" href="#widl-IDBErrorEvent-message"><code>message</code></a>.
   5.295 +                If the <a>object store</a> is destroyed successfully, then a
   5.296 +                <a title="event-success">success event</a> is fired on this 
   5.297 +                method's returned object using the <a><code>IDBTransactionEvent</code></a> interface with its 
   5.298 +                <a class="idlType" href="#widl-IDBSuccessEvent-result"><code>result</code></a> set
   5.299 +                to a <code>null</code> and <a class="idlType" href="#widl-IDBTransactionEvent-transaction"><code>transaction</code></a> set
   5.300 +                to the <a>transaction</a> passed to this method.
   5.301                </p>
   5.302                
   5.303                <dl class="parameters">
   5.304 +                <dt>IDBTransaction txn</dt>
   5.305 +                <dd>An active <a>transaction</a> open in this <a>database</a> 
   5.306 +                <a>connection</a> whose <a>scope</a> is <a>static</a> and 
   5.307 +                <a>global</a></dd>
   5.308                  <dt>DOMString storeName</dt>
   5.309                  <dd>The <a title="object store name">name</a> of an existing
   5.310                  <a>object store</a></dd>
   5.311 @@ -440,6 +539,10 @@
   5.312                This method returns immediately and sets the <a>version</a> of the 
   5.313                <a title="connection">connected</a> <a>database</a>.
   5.314                <dl class="parameters">
   5.315 +                <dt>IDBTransaction txn</dt>
   5.316 +                <dd>An active <a>transaction</a> open in this <a>database</a> 
   5.317 +                <a>connection</a> whose <a>scope</a> is <a>static</a> and 
   5.318 +                <a>global</a></dd>
   5.319                  <dt>[TreatNullAs=EmptyString] DOMString      version</dt>
   5.320                  <dd>The <a>version</a> to store in the <a>database</a></dd>
   5.321                </dl>
   5.322 @@ -447,15 +550,19 @@
   5.323              <dt>IDBRequest openTransaction()</dt>
   5.324              <dd>
   5.325                This method returns immediately and performs the 
   5.326 -              <a>steps for creating a transaction</a> with the list of <a>database</a> 
   5.327 -              <a>objects</a> for acquiring locks required in this <a>transaction</a> 
   5.328 -              and an optional timeout duration. If a <a>transaction</a> can be created
   5.329 -              successfully, then a
   5.330 -              <a title="event-success">success event</a> is fired on this method's
   5.331 -              returned object with its 
   5.332 -              <a class="idlType" href="#widl-IDBSuccessEvent-result"><code>result</code></a> set to a new 
   5.333 -              <a><code>IDBTransactionRequest</code></a> object. If reserving all the 
   5.334 -              <a>database</a> <a>objects</a> identified in the requested <a>scope</a> 
   5.335 +              <a>steps for creating a transaction</a> with either the list of 
   5.336 +              <a>object store</a> <a title="object store name">names</a>
   5.337 +              for acquiring locks required in this <a>transaction</a> or the 
   5.338 +              global flag set to true, and an optional timeout duration. The global flag is set only if the list is not passed or passed as 
   5.339 +              <code>null</code>. If a <a>transaction</a> can be created 
   5.340 +              successfully, then a <a title="event-success">success event</a> is 
   5.341 +              fired on this method's returned object using the 
   5.342 +              <a><code>IDBTransactionEvent</code></a> interface with its 
   5.343 +              <a class="idlType" href="#widl-IDBSuccessEvent-result"><code>result</code></a> set to 
   5.344 +              a new <a><code>IDBTransactionRequest</code></a> object and 
   5.345 +              <a class="idlType" href="#widl-IDBTransactionEvent-transaction"><code>transaction</code></a> 
   5.346 +              set to the <a>transaction</a> passed to this method. If reserving all the 
   5.347 +              <a>object store</a>s identified in the requested <a>scope</a> 
   5.348                takes longer than the specified timeout interval, then an
   5.349                <a title="event-error">error event</a> is fired on this method's
   5.350                returned object with its 
   5.351 @@ -468,6 +575,9 @@
   5.352                  <dd>The names of <a title="object store">object stores</a> and 
   5.353                  <a title="index">indexes</a> in the <a>scope</a> of the new
   5.354                  <a>transaction</a></dd>
   5.355 +                <dt>optional IDBTransaction parent</dt>
   5.356 +                <dd>An active <a>transaction</a> open in this <a>database</a> 
   5.357 +                <a>connection</a></dd>
   5.358                  <dt>optional unsigned long timeout</dt>
   5.359                  <dd>The interval which this operation is allowed to take to
   5.360                  reserve all the <a>database</a> objects identified in the new
   5.361 @@ -481,24 +591,25 @@
   5.362              <dd>
   5.363                This method returns immediately and stores the given value in this 
   5.364                <a>object store</a> by following the 
   5.365 -              <a>steps for storing a record into an object store</a>. If the record
   5.366 -              can be successfully stored in the <a>object store</a>, then a
   5.367 -              <a title="event-success">success event</a> is fired on this method's
   5.368 -              returned object with its 
   5.369 +              <a>steps for storing a record into an object store</a>. If the 
   5.370 +              <a>record</a> can be successfully stored in the <a>object store</a>, then 
   5.371 +              a <a title="event-success">success event</a> is fired on this 
   5.372 +              method's returned object using the 
   5.373 +              <a><code>IDBTransactionEvent</code></a> interface with its 
   5.374                <a class="idlType" href="#widl-IDBSuccessEvent-result"><code>result</code></a> set to
   5.375 -              the key for the stored record.
   5.376 -              If this <a>object store</a> uses 
   5.377 -              <a>out-of-line</a> keys but does not use a <a>key generator</a> and the
   5.378 -              <var>key</var> parameter was not passed, then an
   5.379 +              the key for the stored <a>record</a> and 
   5.380 +              <a class="idlType" href="#widl-IDBTransactionEvent-transaction"><code>transaction</code></a> 
   5.381 +              set to the <a>transaction</a> in which this <a>object store</a> is 
   5.382 +              opened. If this <a>object store</a> uses <a>out-of-line</a> keys 
   5.383 +              but does not use a <a>key generator</a> and the <var>key</var> 
   5.384 +              parameter was not passed, then an
   5.385                <a title="event-error">error event</a> is fired on this method's
   5.386                returned object with its 
   5.387                <a class="idlType" href="#widl-IDBErrorEvent-code"><code>code</code></a> set to
   5.388                <a class="idlType" href="#widl-IDBDatabaseException-DATA_ERR"><code>DATA_ERR</code></a>
   5.389                and a suitable 
   5.390                <a class="idlType" href="#widl-IDBErrorEvent-message"><code>message</code></a>.
   5.391 -              If the data being 
   5.392 -              stored could not be serialized by the <a>internal structured cloning algorithm</a>,
   5.393 -              then an
   5.394 +              If the value being stored could not be serialized by the <a>internal structured cloning algorithm</a>, then an
   5.395                <a title="event-error">error event</a> is fired on this method's
   5.396                returned object with its 
   5.397                <a class="idlType" href="#widl-IDBErrorEvent-code"><code>code</code></a> set to
   5.398 @@ -507,22 +618,27 @@
   5.399                <a class="idlType" href="#widl-IDBErrorEvent-message"><code>message</code></a>.
   5.400                <dl class="parameters">
   5.401                  <dt>any value</dt>
   5.402 -                <dd>The value to be stored in the record</dd>
   5.403 +                <dd>The value to be stored in the <a>record</a></dd>
   5.404                  <dt>optional any key</dt>
   5.405 -                <dd>The key used to identify the record</dd>
   5.406 +                <dd>The key used to identify the <a>record</a>, which defaults 
   5.407 +                to <code>null</code></dd>
   5.408                </dl>
   5.409              </dd>
   5.410              <dt>IDBRequest add()</dt>
   5.411              <dd>
   5.412                This method returns immediately and stores the given value in this 
   5.413                <a>object store</a> by following the 
   5.414 -              <a>steps for storing a record into an object store</a> with the no-overwrite flag
   5.415 -              set. If the record
   5.416 -              can be successfully stored in the <a>object store</a>, then the 
   5.417 -              <a class="idlType" href="#widl-IDBRequest-result"><code>result</code></a>
   5.418 -              of this object's request is set to the key for the stored record.
   5.419 -              If a record exists
   5.420 -              in this <a>object store</a> for the key <var>key</var> parameter, then an
   5.421 +              <a>steps for storing a record into an object store</a> with the 
   5.422 +              no-overwrite flag set. If the <a>record</a> can be successfully 
   5.423 +              stored in the <a>object store</a>, then a 
   5.424 +              <a title="event-success">success event</a> is fired on this 
   5.425 +              method's returned object using the 
   5.426 +              <a><code>IDBTransactionEvent</code></a> interface with its 
   5.427 +              <a class="idlType" href="#widl-IDBSuccessEvent-result"><code>result</code></a> set to
   5.428 +              the key for the stored record and <a class="idlType" href="#widl-IDBTransactionEvent-transaction"><code>transaction</code></a> 
   5.429 +              set to the <a>transaction</a> in which this <a>object store</a> is 
   5.430 +              opened. If a <a>record</a> exists in this <a>object store</a> for 
   5.431 +              the key <var>key</var> parameter, then an
   5.432                <a title="event-error">error event</a> is fired on this method's
   5.433                returned object with its 
   5.434                <a class="idlType" href="#widl-IDBErrorEvent-code"><code>code</code></a> set to
   5.435 @@ -536,9 +652,8 @@
   5.436                <a class="idlType" href="#widl-IDBDatabaseException-DATA_ERR"><code>DATA_ERR</code></a>
   5.437                and a suitable 
   5.438                <a class="idlType" href="#widl-IDBErrorEvent-message"><code>message</code></a>.
   5.439 -              If the data being 
   5.440 -              stored could not be serialized by the <a>internal structured cloning algorithm</a>,
   5.441 -              then an
   5.442 +              If the value being stored could not be serialized by the 
   5.443 +              <a>internal structured cloning algorithm</a>, then an
   5.444                <a title="event-error">error event</a> is fired on this method's
   5.445                returned object with its 
   5.446                <a class="idlType" href="#widl-IDBErrorEvent-code"><code>code</code></a> set to
   5.447 @@ -547,34 +662,44 @@
   5.448                <a class="idlType" href="#widl-IDBErrorEvent-message"><code>message</code></a>.
   5.449                <dl class="parameters">
   5.450                  <dt>any value</dt>
   5.451 -                <dd>The value to be stored in the record</dd>
   5.452 +                <dd>The value to be stored in the <a>record</a></dd>
   5.453                  <dt>optional any key</dt>
   5.454 -                <dd>The key used to identify the record</dd>
   5.455 +                <dd>The key used to identify the <a>record</a>, which defaults 
   5.456 +                to <code>null</code></dd>
   5.457                </dl>
   5.458              </dd>
   5.459              <dt>IDBRequest remove()</dt>
   5.460              <dd>
   5.461 -              This method returns immediately and removes the record from this 
   5.462 -              <a>object store</a> by following the 
   5.463 -              <a>steps for deleting a record from an object store</a> corresponding to
   5.464 -              the given key. If a record did not exist in this <a>object store</a> 
   5.465 -              for the key <var>key</var> parameter, then an 
   5.466 -              <a title="event-error">error event</a> is fired on this method's
   5.467 -              returned object with its 
   5.468 +              This method returns immediately and removes the <a>record</a> from 
   5.469 +              this <a>object store</a> by following the 
   5.470 +              <a>steps for deleting a record from an object store</a> 
   5.471 +              corresponding to the given key. If a <a>record</a> did not exist 
   5.472 +              in this <a>object store</a> for the key <var>key</var> parameter, 
   5.473 +              then an <a title="event-error">error event</a> is fired on this 
   5.474 +              method's returned object with its 
   5.475                <a class="idlType" href="#widl-IDBErrorEvent-code"><code>code</code></a> set to
   5.476                <a class="idlType" href="#widl-IDBDatabaseException-NOT_FOUND_ERR"><code>NOT_FOUND_ERR</code></a>
   5.477                and a suitable 
   5.478 -              <a class="idlType" href="#widl-IDBErrorEvent-message"><code>message</code></a>.
   5.479 +              <a class="idlType" href="#widl-IDBErrorEvent-message"><code>message</code></a>. If the <a>record</a> can be successfully 
   5.480 +              removed from the <a>object store</a>, then a 
   5.481 +              <a title="event-success">success event</a> is fired on this 
   5.482 +              method's returned object using the 
   5.483 +              <a><code>IDBTransactionEvent</code></a> interface with its 
   5.484 +              <a class="idlType" href="#widl-IDBSuccessEvent-result"><code>result</code></a> set to
   5.485 +              the value of the removed <a>record</a> and <a class="idlType" href="#widl-IDBTransactionEvent-transaction"><code>transaction</code></a> 
   5.486 +              set to the <a>transaction</a> in which this <a>object store</a> is 
   5.487 +              opened. 
   5.488                <dl class="parameters">
   5.489                  <dt>any key</dt>
   5.490 -                <dd>Key identifying the record to be removed</dd>
   5.491 +                <dd>Key identifying the <a>record</a> to be removed</dd>
   5.492                </dl>
   5.493              </dd>
   5.494              <dt>IDBRequest get()</dt>
   5.495              <dd>
   5.496                This method returns immediately and retrieves the value from this 
   5.497 -              <a>object store</a> for the record corresponding to the given key by
   5.498 -              following the <a>steps for retrieving a record from an object store</a>. 
   5.499 +              <a>object store</a> for the record corresponding to the given key 
   5.500 +              by following the 
   5.501 +              <a>steps for retrieving a record from an object store</a>. 
   5.502                If the operation is successful, then the 
   5.503                <a class="idlType" href="#widl-IDBRequest-result"><code>result</code></a> of this object's request
   5.504                is set to the retrieved value. If a record did not exist in this 
   5.505 @@ -584,10 +709,18 @@
   5.506                <a class="idlType" href="#widl-IDBErrorEvent-code"><code>code</code></a> set to
   5.507                <a class="idlType" href="#widl-IDBDatabaseException-NOT_FOUND_ERR"><code>NOT_FOUND_ERR</code></a>
   5.508                and a suitable 
   5.509 -              <a class="idlType" href="#widl-IDBErrorEvent-message"><code>message</code></a>.
   5.510 +              <a class="idlType" href="#widl-IDBErrorEvent-message"><code>message</code></a>. If the <a>record</a> can be successfully 
   5.511 +              retrieved from the <a>object store</a>, then a 
   5.512 +              <a title="event-success">success event</a> is fired on this 
   5.513 +              method's returned object using the 
   5.514 +              <a><code>IDBTransactionEvent</code></a> interface with its 
   5.515 +              <a class="idlType" href="#widl-IDBSuccessEvent-result"><code>result</code></a> set to
   5.516 +              the value of the retrieved <a>record</a> and <a class="idlType" href="#widl-IDBTransactionEvent-transaction"><code>transaction</code></a> 
   5.517 +              set to the <a>transaction</a> in which this <a>object store</a> is 
   5.518 +              opened. 
   5.519                <dl class="parameters">
   5.520                  <dt>any key</dt>
   5.521 -                <dd>Key identifying the record to be retrieved</dd>
   5.522 +                <dd>Key identifying the <a>record</a> to be retrieved</dd>
   5.523                </dl>
   5.524              </dd>
   5.525              <dt>IDBRequest openCursor()</dt>
   5.526 @@ -659,7 +792,7 @@
   5.527                  <dd>The <a>unique</a> flag for the new <a>index</a></dd>
   5.528                </dl>
   5.529              </dd>
   5.530 -            <dt>IDBRequest openIndex()</dt>
   5.531 +            <dt>IDBIndexRequest index()</dt>
   5.532              <dd>
   5.533                <p>
   5.534                  This method returns immediately and opens the <a>index</a> with the
   5.535 @@ -815,7 +948,7 @@
   5.536                  <dt>any key</dt>
   5.537                  <dd>Key identifying the record to be retrieved</dd>
   5.538                </dl>
   5.539 --            </dd>
   5.540 +            </dd>
   5.541              <dt>IDBRequest get()</dt>
   5.542              <dd>
   5.543                This method returns immediately and retrieves the value from this <a>index</a>
   5.544 @@ -936,11 +1069,26 @@
   5.545              </dd>
   5.546            </dl>
   5.547            <dl class="idl" title="[NoInterfaceObject] interface IDBTransactionRequest : IDBTransaction">
   5.548 +            <dt>IDBObjectStoreRequest objectStore()</dt>
   5.549 +            <dd>
   5.550 +              Immediately returns the object store that has been already added 
   5.551 +              to the <a>scope</a> of this <a>transaction</a>. 
   5.552 +              <dl class="parameters">
   5.553 +                <dt>DOMString name</dt>
   5.554 +                <dd>The requested <a>object store</a></dd>
   5.555 +              </dl>
   5.556 +              <dl class="exception" title="IDBDatabaseException">
   5.557 +                <dt><a class="idlType" href="#widl-IDBDatabaseException-NOT_FOUND_ERR"><code>NOT_FOUND_ERR</code></a></dt>
   5.558 +                <dd>
   5.559 +                If the requested <a>object store</a> is not in this 
   5.560 +                <a>transaction</a>'s <a>scope</a>.
   5.561 +                </dd>
   5.562 +              </dl>
   5.563 +            </dd>
   5.564              <dt>void abort()</dt>
   5.565              <dd>
   5.566                This method returns immediately and undoes all the changes performed to 
   5.567 -              the <a>objects</a> of this <a>database</a> since the creation of this 
   5.568 -              <a>transaction</a>. If this <a>transaction</a> has already been committed
   5.569 +              the <a>objects</a> of this <a>database</a> in this <a>transaction</a>. If this <a>transaction</a> has already been committed
   5.570                or aborted,  then an
   5.571                <a title="event-error">error event</a> is fired on this method's
   5.572                returned object with its 
   5.573 @@ -951,19 +1099,19 @@
   5.574              </dd>
   5.575              <dt>void commit()</dt>
   5.576              <dd>
   5.577 -              This method returns immediately and durably stores all the changes made
   5.578 -              to the <a>objects</a> of this <a>database</a> since the creation of this
   5.579 -              <a>transaction</a>. If this <a>transaction</a> has already been committed
   5.580 -              or aborted,  then an
   5.581 +              This method returns immediately and durably stores all the changes 
   5.582 +              made to the <a>objects</a> of this <a>database</a> since the 
   5.583 +              creation of this <a>transaction</a>. If this <a>transaction</a> 
   5.584 +              has already been committed or aborted,  then an
   5.585                <a title="event-error">error event</a> is fired on this method's
   5.586                returned object with its 
   5.587                <a class="idlType" href="#widl-IDBErrorEvent-code"><code>code</code></a> set to
   5.588                <a class="idlType" href="#widl-IDBDatabaseException-NON_TRANSIENT_ERR"><code>NON_TRANSIENT_ERR</code></a>
   5.589                and a suitable 
   5.590                <a class="idlType" href="#widl-IDBErrorEvent-message"><code>message</code></a>.
   5.591 -              If this <a>transaction</a>'s 
   5.592 -              <a>scope</a> is <a>dynamic</a>, and the user agent cannot commit all the
   5.593 -              changes due to conflicts with another <a>transaction</a>, then an
   5.594 +              If this <a>transaction</a>'s <a>scope</a> is <a>dynamic</a>, and
   5.595 +              the user agent cannot commit all the changes due to conflicts with 
   5.596 +              another <a>transaction</a>, then an
   5.597                <a title="event-error">error event</a> is fired on this method's
   5.598                returned object with its 
   5.599                <a class="idlType" href="#widl-IDBErrorEvent-code"><code>code</code></a> set to
   5.600 @@ -971,7 +1119,11 @@
   5.601                and a suitable 
   5.602                <a class="idlType" href="#widl-IDBErrorEvent-message"><code>message</code></a>.
   5.603              </dd>
   5.604 +            <dt>attribute Function onabort</dt>
   5.605 +            <dt>attribute Function oncomplete</dt>
   5.606 +            <dt>attribute Function ontimeout</dt>
   5.607            </dl>
   5.608 +          <p class="idl" title="IDBTransactionRequest implements EventTarget">
   5.609          </section>
   5.610                    
   5.611        </section>            
     6.1 --- a/build.pl	Thu Jun 17 12:31:27 2010 -0700
     6.2 +++ b/build.pl	Tue Jun 22 00:59:36 2010 +0800
     6.3 @@ -4,9 +4,9 @@
     6.4  @intro = ('Speclet_010_Intro.html');
     6.5  @content = (
     6.6    'Speclet_020_IDB_API_Constructs.html',
     6.7 -  'Speclet_021_IDB_API_Algorithms.html',
     6.8 +  'Speclet_023_IDB_API_Asynchronous_APIs.html',
     6.9    'Speclet_022_IDB_API_Synchronous_APIs.html',
    6.10 -  'Speclet_023_IDB_API_Asynchronous_APIs.html',
    6.11 +  'Speclet_021_IDB_API_Algorithms.html'
    6.12  );
    6.13  @ending = ('Speclet_030_Privacy_Authorization.html');
    6.14  
     7.1 --- a/template.html	Thu Jun 17 12:31:27 2010 -0700
     7.2 +++ b/template.html	Tue Jun 22 00:59:36 2010 +0800
     7.3 @@ -136,7 +136,8 @@
     7.4      <section id="database-api" class="section">
     7.5        <h2>Indexed Database API</h2>
     7.6  	  <!-- body-content -->
     7.7 -    </section> <!-- database-api -->
     7.8 +    </section> 
     7.9 +  <!-- database-api -->
    7.10  
    7.11  
    7.12  	<!-- ending-content -->