diff --git a/components/script/dom/idbobjectstore.rs b/components/script/dom/idbobjectstore.rs index 9ecc6c91e56..c11ddd23c48 100644 --- a/components/script/dom/idbobjectstore.rs +++ b/components/script/dom/idbobjectstore.rs @@ -449,9 +449,9 @@ impl IDBObjectStoreMethods for IDBObjectStore { // } // https://www.w3.org/TR/IndexedDB-2/#dom-idbobjectstore-transaction - // fn Transaction(&self) -> DomRoot { - // unimplemented!(); - // } + fn GetTransaction(&self) -> Option> { + self.transaction() + } // https://www.w3.org/TR/IndexedDB-2/#dom-idbobjectstore-autoincrement fn AutoIncrement(&self) -> bool { diff --git a/components/script_bindings/webidls/IDBObjectStore.webidl b/components/script_bindings/webidls/IDBObjectStore.webidl index 9661e28db45..1151b3ffbd8 100644 --- a/components/script_bindings/webidls/IDBObjectStore.webidl +++ b/components/script_bindings/webidls/IDBObjectStore.webidl @@ -13,7 +13,7 @@ interface IDBObjectStore { attribute DOMString name; // readonly attribute any keyPath; // readonly attribute DOMStringList indexNames; - // [SameObject] readonly attribute IDBTransaction transaction; + [SameObject] readonly attribute IDBTransaction? transaction; readonly attribute boolean autoIncrement; [NewObject, Throws] IDBRequest put(any value, optional any key); diff --git a/tests/wpt/meta/IndexedDB/idbobjectstore_get.any.js.ini b/tests/wpt/meta/IndexedDB/idbobjectstore_get.any.js.ini index 5fc15851a35..5dcdf74205d 100644 --- a/tests/wpt/meta/IndexedDB/idbobjectstore_get.any.js.ini +++ b/tests/wpt/meta/IndexedDB/idbobjectstore_get.any.js.ini @@ -2,13 +2,8 @@ expected: ERROR [idbobjectstore_get.any.html] - [When a transaction is aborted, throw TransactionInactiveError] - expected: FAIL - [idbobjectstore_get.any.serviceworker.html] expected: ERROR [idbobjectstore_get.any.worker.html] - [When a transaction is aborted, throw TransactionInactiveError] - expected: FAIL diff --git a/tests/wpt/meta/IndexedDB/idlharness.any.js.ini b/tests/wpt/meta/IndexedDB/idlharness.any.js.ini index 3bb06f22317..6f849d9aed9 100644 --- a/tests/wpt/meta/IndexedDB/idlharness.any.js.ini +++ b/tests/wpt/meta/IndexedDB/idlharness.any.js.ini @@ -11,9 +11,6 @@ [IDBObjectStore interface: attribute indexNames] expected: FAIL - [IDBObjectStore interface: attribute transaction] - expected: FAIL - [IDBObjectStore interface: operation getAll(optional any, optional unsigned long)] expected: FAIL @@ -178,9 +175,6 @@ [IDBObjectStore interface: attribute indexNames] expected: FAIL - [IDBObjectStore interface: attribute transaction] - expected: FAIL - [IDBObjectStore interface: operation getAll(optional any, optional unsigned long)] expected: FAIL