summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSamuel Mannehed <samuel@cendio.se>2019-10-24 16:43:07 +0200
committerSamuel Mannehed <samuel@cendio.se>2020-01-02 11:30:34 +0100
commit11ae8f0ef4dc1edffb497c0ed56e66054f897b20 (patch)
treecf8cd1ef400929263e1e80a24a0717745fef2a96
parentc32d4f3cd0c19c0cf1a96207adc253f6073014d4 (diff)
downloadnovnc-11ae8f0ef4dc1edffb497c0ed56e66054f897b20.tar.gz
Add comment for browser and platform detection
-rw-r--r--core/util/browser.js7
1 files changed, 7 insertions, 0 deletions
diff --git a/core/util/browser.js b/core/util/browser.js
index 8262692..1554801 100644
--- a/core/util/browser.js
+++ b/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);
}