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.
This commit is contained in:
parent
4bd956f891
commit
83a6808c67
|
@ -132,7 +132,7 @@ const iconMan = (() => {
|
||||||
|
|
||||||
// Caches imageData for icon paths
|
// Caches imageData for icon paths
|
||||||
async function loadImage(url) {
|
async function loadImage(url) {
|
||||||
const {OffscreenCanvas} = self.createImageBitmap && self || {};
|
const {OffscreenCanvas} = !FIREFOX && self.createImageBitmap && self || {};
|
||||||
const img = OffscreenCanvas
|
const img = OffscreenCanvas
|
||||||
? await createImageBitmap(await (await fetch(url)).blob())
|
? await createImageBitmap(await (await fetch(url)).blob())
|
||||||
: await new Promise((resolve, reject) =>
|
: await new Promise((resolve, reject) =>
|
||||||
|
|
Loading…
Reference in New Issue
Block a user