3379ab58f50d89356ee9d30e6c37a0db9469c72d
[gecko.git] / idbdatabase_createObjectStore.htm
blob3379ab58f50d89356ee9d30e6c37a0db9469c72d
1 <!DOCTYPE html>
2 <title>IDBDatabase.createObjectStore() - returns an instance of IDBObjectStore</title>
3 <link rel="author" title="Microsoft" href="http://www.microsoft.com">
4 <script src=/resources/testharness.js></script>
5 <script src=/resources/testharnessreport.js></script>
6 <script src=resources/support.js></script>
8 <script>
10 var t = async_test(),
11 open_rq = createdb(t)
13 open_rq.onupgradeneeded = function(e) {
14 var db = e.target.result
15 var objStore = db.createObjectStore('instancetest')
17 assert_true(objStore instanceof IDBObjectStore, 'instanceof IDBObjectStore')
20 open_rq.onsuccess = function(e) {
21 var db = e.target.result
22 var objStore = db.transaction('instancetest', 'readonly', {durability: 'relaxed'}).objectStore('instancetest')
24 assert_true(objStore instanceof IDBObjectStore, 'instanceof IDBObjectStore')
25 t.done()
27 </script>
29 <div id=log></div>