diff --git a/src/browser/Factory.zig b/src/browser/Factory.zig
index a1a7ed600..424ae7ee3 100644
--- a/src/browser/Factory.zig
+++ b/src/browser/Factory.zig
@@ -33,6 +33,7 @@ const Document = @import("webapi/Document.zig");
const EventTarget = @import("webapi/EventTarget.zig");
const AbortSignal = @import("webapi/AbortSignal.zig");
const XMLHttpRequestEventTarget = @import("webapi/net/XMLHttpRequestEventTarget.zig");
+const IDBRequest = @import("webapi/storage/idb/IDBRequest.zig");
const Blob = @import("webapi/Blob.zig");
const AbstractRange = @import("webapi/AbstractRange.zig");
const DOMRect = @import("webapi/DOMRect.zig");
@@ -505,6 +506,12 @@ pub fn xhrEventTarget(_: *const Factory, allocator: Allocator, child: anytype) !
).create(allocator, child);
}
+pub fn idbOpenRequest(self: *Factory, child: anytype) !*@TypeOf(child) {
+ return try AutoPrototypeChain(
+ &.{ EventTarget, IDBRequest, @TypeOf(child) },
+ ).create(self._slab.allocator(), child);
+}
+
pub fn taskSignal(self: *Factory, child: anytype) !*@TypeOf(child) {
return try AutoPrototypeChain(
&.{ EventTarget, AbortSignal, @TypeOf(child) },
diff --git a/src/browser/tests/indexeddb.html b/src/browser/tests/indexeddb.html
index fd0d0637a..4e0e657fa 100644
--- a/src/browser/tests/indexeddb.html
+++ b/src/browser/tests/indexeddb.html
@@ -329,9 +329,9 @@
db.deleteObjectStore("temp");
};
open.onsuccess = (e) => {
- const tx = e.target.result.transaction("temp", "readonly");
+ // The deleted store is not in the database: transaction() itself throws.
let threw = null;
- try { tx.objectStore("temp"); } catch (err) { threw = err; }
+ try { e.target.result.transaction("temp", "readonly"); } catch (err) { threw = err; }
state.resolve(threw && threw.name);
};
await state.done((name) => {
@@ -1189,6 +1189,7 @@
});
}
+<<<<<<< HEAD
+
+