From 83a6808c67958ab044cfde622e6a8adff55db61b Mon Sep 17 00:00:00 2001 From: Gusted Date: Mon, 31 May 2021 16:21:17 +0200 Subject: [PATCH] Disable Offscreencanvas for firefox (#1258) Currently the offscreencanvas is being used for '2d' context, however Firefox doesn't implement this as for now, see: https://searchfox.org/mozilla-central/source/dom/canvas/OffscreenCanvas.cpp#105-110 and it will error out multiple times within the console. --- background/icon-manager.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/background/icon-manager.js b/background/icon-manager.js index 85a2be2d..798c2beb 100644 --- a/background/icon-manager.js +++ b/background/icon-manager.js @@ -132,7 +132,7 @@ const iconMan = (() => { // Caches imageData for icon paths async function loadImage(url) { - const {OffscreenCanvas} = self.createImageBitmap && self || {}; + const {OffscreenCanvas} = !FIREFOX && self.createImageBitmap && self || {}; const img = OffscreenCanvas ? await createImageBitmap(await (await fetch(url)).blob()) : await new Promise((resolve, reject) =>