spot: close offscreen doc before reinit
This commit is contained in:
parent
58111d2323
commit
3410aec605
1 changed files with 5 additions and 7 deletions
|
|
@ -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 {
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue