From 2f43cead79e00856086dbc1457fe6cca3d44c00f Mon Sep 17 00:00:00 2001 From: Samuel Mannehed Date: Thu, 24 Oct 2019 16:43:07 +0200 Subject: [PATCH] Add comment for browser and platform detection --- kasmweb/core/util/browser.js | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/kasmweb/core/util/browser.js b/kasmweb/core/util/browser.js index 8262692..1554801 100644 --- a/kasmweb/core/util/browser.js +++ b/kasmweb/core/util/browser.js @@ -79,6 +79,13 @@ try { } export const hasScrollbarGutter = _hasScrollbarGutter; +/* + * The functions for detection of platforms and browsers below are exported + * but the use of these should be minimized as much as possible. + * + * It's better to use feature detection than platform detection. + */ + export function isMac() { return navigator && !!(/mac/i).exec(navigator.platform); }