refactor: simplify canvas filter support check

This commit is contained in:
CNCKitchen
2026-04-01 11:15:35 +02:00
parent bc5c4625fc
commit 5b6049bb1e
+1 -7
View File
@@ -60,13 +60,7 @@ const settings = {
}; };
// ── Canvas filter support (Safari / iOS WebView don't support ctx.filter) ──── // ── Canvas filter support (Safari / iOS WebView don't support ctx.filter) ────
const CANVAS_FILTER_SUPPORTED = (() => { const CANVAS_FILTER_SUPPORTED = 'filter' in CanvasRenderingContext2D.prototype;
try {
const ctx = document.createElement('canvas').getContext('2d');
ctx.filter = 'blur(1px)';
return ctx.filter === 'blur(1px)';
} catch (e) { return false; }
})();
/** /**
* Box-blur one row of RGBA pixels (horizontal pass). * Box-blur one row of RGBA pixels (horizontal pass).