spot: close offscreen doc before reinit

This commit is contained in:
nick-delirium 2025-05-23 10:13:36 +02:00
parent 58111d2323
commit 3410aec605
No known key found for this signature in database
GPG key ID: 93ABD695DF5FDBA0

View file

@ -965,13 +965,11 @@ export default defineBackground(() => {
(c: { contextType: string }) => c.contextType === "OFFSCREEN_DOCUMENT", (c: { contextType: string }) => c.contextType === "OFFSCREEN_DOCUMENT",
); );
if (offscreenDocument) { if (offscreenDocument) {
return; try {
// TODO: check manifestv3 for reloading context await browser.offscreen.closeDocument();
// try { } catch (e) {
// await browser.offscreen.closeDocument(); console.error("Spot: error closing old offscreen document", e);
// } catch (e) { }
// console.trace(e)
// }
} }
try { try {