You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
without changing the <a data-link-type="dfn" href="#database-version" id="ref-for-database-version-6">version</a>. If <var>version</var> is not given and no <a data-link-type="dfn" href="#database" id="ref-for-database-31">database</a> with
2918
2918
that name exists, a new <a data-link-type="dfn" href="#database" id="ref-for-database-32">database</a> will be created with <a data-link-type="dfn" href="#database-version" id="ref-for-database-version-7">version</a> equal to 1. </aside>
2919
2919
<li data-md="">
2920
-
<p>If <var>result</var> is an error, set the <a data-link-type="dfn" href="#request-error" id="ref-for-request-error-3">error</a> of <var>request</var> to <var>result</var> and dispatch an event at <var>request</var>.
2921
-
The event must use the <a data-link-type="dfn" href="https://dom.spec.whatwg.org/#concept-event">Event</a> interface and set the <code class="idl"><a data-link-type="idl" href="https://dom.spec.whatwg.org/#dom-event-type">type</a></code> attribute to "<code>error</code>". The event
2922
-
does bubble but is not cancelable.</p>
2923
-
<li data-md="">
2924
-
<p>Otherwise, set the <a data-link-type="dfn" href="#request-result" id="ref-for-request-result-4">result</a> of <var>request</var> to <var>result</var> and dispatch an event
2925
-
at <var>request</var>. The event must use the <a data-link-type="dfn" href="https://dom.spec.whatwg.org/#concept-event">Event</a> interface and set the <code class="idl"><a data-link-type="idl" href="https://dom.spec.whatwg.org/#dom-event-type">type</a></code> attribute to
2926
-
"<code>success</code>". The event does not bubble and is not
2927
-
cancelable. If the steps above resulted in an <a data-link-type="dfn" href="#upgrade-transaction" id="ref-for-upgrade-transaction-14">upgrade
2928
-
transaction</a> being run, then firing the
2929
-
"<code>success</code>" event must be done after the <a data-link-type="dfn" href="#upgrade-transaction" id="ref-for-upgrade-transaction-15">upgrade
2930
-
transaction</a> completes.</p>
2931
-
<aside class="note" role="note"> The last requirement is to ensure that in case another
2920
+
<p><a data-link-type="dfn" href="https://html.spec.whatwg.org/multipage/webappapis.html#queue-a-task">Queue a task</a> to run these substeps:</p>
2921
+
<ol>
2922
+
<li data-md="">
2923
+
<p>If <var>result</var> is an error, set the <a data-link-type="dfn" href="#request-error" id="ref-for-request-error-3">error</a> of <var>request</var> to <var>result</var> and dispatch an event at <var>request</var>. The event must use the <a data-link-type="dfn" href="https://dom.spec.whatwg.org/#concept-event">Event</a> interface
2924
+
and set the <code class="idl"><a data-link-type="idl" href="https://dom.spec.whatwg.org/#dom-event-type">type</a></code> attribute to
2925
+
"<code>error</code>". The event does bubble but is not
2926
+
cancelable.</p>
2927
+
<li data-md="">
2928
+
<p>Otherwise, set the <a data-link-type="dfn" href="#request-result" id="ref-for-request-result-4">result</a> of <var>request</var> to <var>result</var> and dispatch an event at <var>request</var>. The event
2929
+
must use the <a data-link-type="dfn" href="https://dom.spec.whatwg.org/#concept-event">Event</a> interface and set the <code class="idl"><a data-link-type="idl" href="https://dom.spec.whatwg.org/#dom-event-type">type</a></code> attribute to "<code>success</code>". The
2930
+
event does not bubble and is not cancelable. If the steps
2931
+
above resulted in an <a data-link-type="dfn" href="#upgrade-transaction" id="ref-for-upgrade-transaction-14">upgrade transaction</a> being run,
2932
+
then firing the "<code>success</code>" event must be done
2933
+
after the <a data-link-type="dfn" href="#upgrade-transaction" id="ref-for-upgrade-transaction-15">upgrade transaction</a> completes.</p>
2934
+
<aside class="note" role="note"> The last requirement is to ensure that in case another
2932
2935
version upgrade is about to happen, the success event is
2933
2936
fired on the connection first so that the script gets a
2934
2937
chance to register a listener for the <code>versionchange</code> event. </aside>
2935
-
<aside class="note" role="note"> The firing of "<code>success</code>" or "<code>error</code>"
2938
+
<aside class="note" role="note"> The firing of "<code>success</code>" or "<code>error</code>"
2936
2939
events do not follow the normal steps to <a data-link-type="dfn" href="#request-fire-a-success-event" id="ref-for-request-fire-a-success-event-1">fire a success
2937
2940
event</a> or <a data-link-type="dfn" href="#request-fire-an-error-event" id="ref-for-request-fire-an-error-event-1">fire an error event</a> as there is no
2938
2941
active transaction at the time when they fire. </aside>
2942
+
</ol>
2939
2943
</ol>
2940
2944
<li data-md="">
2941
2945
<p>Return a new <code class="idl"><a data-link-type="idl" href="#request-idbopendbrequest" id="ref-for-request-idbopendbrequest-3">IDBOpenDBRequest</a></code> object for <var>request</var>.</p>
<p>Let <var>request</var> be a new <a data-link-type="dfn" href="#request-open-request" id="ref-for-request-open-request-12">open request</a>.</p>
2950
2954
<li data-md="">
2951
-
<p><a data-link-type="dfn" href="https://html.spec.whatwg.org/multipage/webappapis.html#queue-a-task">Queue a task</a> to run these substeps:</p>
2955
+
<p>Run the following substeps in parallel:</p>
2952
2956
<ol>
2953
2957
<li data-md="">
2954
2958
<p>Let <var>result</var> be the result of running the <a data-link-type="dfn" href="#request-steps-for-deleting-a-database" id="ref-for-request-steps-for-deleting-a-database-1">steps for
2955
2959
deleting a database</a>, with the origin of the <code class="idl"><a data-link-type="idl" href="#request-idbenvironment" id="ref-for-request-idbenvironment-4">IDBEnvironment</a></code> used to access this <code class="idl"><a data-link-type="idl" href="#request-idbfactory" id="ref-for-request-idbfactory-5">IDBFactory</a></code>, <var>name</var>, and <var>request</var>.</p>
2956
2960
<li data-md="">
2957
-
<p>If <var>result</var> is an error set the <a data-link-type="dfn" href="#request-error" id="ref-for-request-error-4">error</a> of <var>request</var> to <var>result</var> and dispatch an event at <var>request</var>.
2958
-
The event must use the <a data-link-type="dfn" href="https://dom.spec.whatwg.org/#concept-event">Event</a> interface and set the <code class="idl"><a data-link-type="idl" href="https://dom.spec.whatwg.org/#dom-event-type">type</a></code> attribute to "<code>error</code>". The event
2959
-
does bubble but is not cancelable.</p>
2960
-
<li data-md="">
2961
-
<p>Otherwise, set the <a data-link-type="dfn" href="#request-result" id="ref-for-request-result-5">result</a> of <var>request</var> to undefined and <a data-link-type="dfn" href="#request-fire-a-version-change-event" id="ref-for-request-fire-a-version-change-event-1">fire a version change
2962
-
event</a> named <code>success</code> at <a data-link-type="dfn" href="#request" id="ref-for-request-20">request</a> with <var>result</var> and null.</p>
2963
-
<aside class="note" role="note"> The firing of "<code>success</code>" or "<code>error</code>"
2961
+
<p><a data-link-type="dfn" href="https://html.spec.whatwg.org/multipage/webappapis.html#queue-a-task">Queue a task</a> to run these substeps:</p>
2962
+
<ol>
2963
+
<li data-md="">
2964
+
<p>If <var>result</var> is an error set the <a data-link-type="dfn" href="#request-error" id="ref-for-request-error-4">error</a> of <var>request</var> to <var>result</var> and dispatch an event at <var>request</var>.
2965
+
The event must use the <a data-link-type="dfn" href="https://dom.spec.whatwg.org/#concept-event">Event</a> interface and set the <code class="idl"><a data-link-type="idl" href="https://dom.spec.whatwg.org/#dom-event-type">type</a></code> attribute to "<code>error</code>". The
2966
+
event does bubble but is not cancelable.</p>
2967
+
<li data-md="">
2968
+
<p>Otherwise, set the <a data-link-type="dfn" href="#request-result" id="ref-for-request-result-5">result</a> of <var>request</var> to undefined and <a data-link-type="dfn" href="#request-fire-a-version-change-event" id="ref-for-request-fire-a-version-change-event-1">fire a version change event</a> named <code>success</code> at <a data-link-type="dfn" href="#request" id="ref-for-request-20">request</a> with <var>result</var> and
2969
+
null.</p>
2970
+
<aside class="note" role="note"> The firing of "<code>success</code>" or "<code>error</code>"
2964
2971
events do not follow the normal steps to <a data-link-type="dfn" href="#request-fire-a-success-event" id="ref-for-request-fire-a-success-event-2">fire a success
2965
2972
event</a> or <a data-link-type="dfn" href="#request-fire-an-error-event" id="ref-for-request-fire-an-error-event-2">fire an error event</a> as there is no
2966
2973
active transaction at the time when they fire. </aside>
2974
+
</ol>
2967
2975
</ol>
2968
2976
<li data-md="">
2969
2977
<p>Return a new <code class="idl"><a data-link-type="idl" href="#request-idbopendbrequest" id="ref-for-request-idbopendbrequest-4">IDBOpenDBRequest</a></code> object for <var>request</var>.</p>
0 commit comments