indexeddb

This commit is contained in:
velzie 2024-09-01 20:35:09 -04:00
parent 430c7ad6ec
commit 6bac2dde2f
No known key found for this signature in database
GPG key ID: 048413F95F0DDE1F

View file

@ -0,0 +1,16 @@
import { ScramjetClient } from "../client";
export default function (client: ScramjetClient, self: Self) {
client.Proxy("IDBFactory.prototype.open", {
apply(ctx) {
ctx.args[0] = `${client.url.origin}@${ctx.args[0]}`;
},
});
client.Trap("IDBDatabase.prototype.name", {
get(ctx) {
let name = ctx.get() as string;
return name.substring(name.indexOf("@") + 1);
},
});
}