complete

  • Revision slug: Web/Reference/Events/complete_indexedDB
  • Revision title: complete
  • Revision id: 403095
  • Created:
  • Creator: Sheppy
  • Is current revision? Yes
  • Comment Moved From DOM/Mozilla_event_reference/complete_indexedDB to Web/Reference/Events/complete_indexedDB

Revision Content

The complete handler is executed when a transaction successfully completed.

General info

Specification
IndexedDB
Interface
Event
Bubbles
No
Cancelable
No
Target
IDBTransaction
Default Action
None

Properties

{{OpenEventProperties("The request concerned by this event")}}{{CloseEventProperties()}}

Example

var transaction = db.transaction(["customers"], IDBTransaction.versionchange);

transaction.oncomplete = function( event ) {
  ...
}

// which is equivalent to
transaction.addEventListener("complete", function( event ) {
  ...
});

{{IDBRelatedEvents()}}

See also

Revision Source

<p>The <code>complete</code> handler is executed when a transaction successfully completed.</p>
<h2 id="General_info">General info</h2>
<dl>
  <dt style="clear: left; float: left; text-align: right; width: 120px;">
    Specification</dt>
  <dd style="margin: 0 0 0 120px;">
    <a class="external" href="http://www.w3.org/TR/IndexedDB/#request-api">IndexedDB</a></dd>
  <dt style="clear: left; float: left; text-align: right; width: 120px;">
    Interface</dt>
  <dd style="margin: 0 0 0 120px;">
    Event</dd>
  <dt style="clear: left; float: left; text-align: right; width: 120px;">
    Bubbles</dt>
  <dd style="margin: 0 0 0 120px;">
    No</dd>
  <dt style="clear: left; float: left; text-align: right; width: 120px;">
    Cancelable</dt>
  <dd style="margin: 0 0 0 120px;">
    No</dd>
  <dt style="clear: left; float: left; text-align: right; width: 120px;">
    Target</dt>
  <dd style="margin: 0 0 0 120px;">
    IDBTransaction</dd>
  <dt style="clear: left; float: left; text-align: right; width: 120px;">
    Default Action</dt>
  <dd style="margin: 0 0 0 120px;">
    None</dd>
</dl>
<h2 id="Properties">Properties</h2>
<p>{{OpenEventProperties("The request concerned by this event")}}{{CloseEventProperties()}}</p>
<h2 id="Example">Example</h2>
<pre class="brush:js;">
var transaction = db.transaction(["customers"], IDBTransaction.versionchange);

transaction.oncomplete = function( event ) {
  ...
}

// which is equivalent to
transaction.addEventListener("complete", function( event ) {
  ...
});
</pre>
<h2 id="Related_Events">Related Events</h2>
<p>{{IDBRelatedEvents()}}</p>
<h2 id="See_also">See also</h2>
<ul>
  <li><a href="/en-US/docs/IndexedDB/Using_IndexedDB">Using IndexedDB</a></li>
</ul>
Revert to this revision