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",
|
||||
);
|
||||
if (offscreenDocument) {
|
||||
return;
|
||||
// TODO: check manifestv3 for reloading context
|
||||
// try {
|
||||
// await browser.offscreen.closeDocument();
|
||||
// } catch (e) {
|
||||
// console.trace(e)
|
||||
// }
|
||||
try {
|
||||
await browser.offscreen.closeDocument();
|
||||
} catch (e) {
|
||||
console.error("Spot: error closing old offscreen document", e);
|
||||
}
|
||||
}
|
||||
|
||||
try {
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue