1
0
mirror of https://github.com/psychopy/psychojs.git synced 2025-05-10 10:40:54 +00:00

Update Util.js

Added Blink detection (from snippet at https://stackoverflow.com/a/9851769)
This commit is contained in:
tpronk 2020-04-30 15:51:31 +02:00
parent 0ca9e118a4
commit 926ec69386

View File

@ -162,6 +162,10 @@ export function detectBrowser()
const isEdgeChromium = isChrome && (navigator.userAgent.indexOf("Edg") !== -1);
if (isEdgeChromium) return 'EdgeChromium';
// Blink engine detection
const isBlink = (isChrome || isOpera) && !!window.CSS;
if (isBlink) return "Blink";
return 'unknown';
}