diff options
author | Samuel Mannehed <samuel@cendio.se> | 2019-10-24 16:43:07 +0200 |
---|---|---|
committer | Samuel Mannehed <samuel@cendio.se> | 2020-01-02 11:30:34 +0100 |
commit | 11ae8f0ef4dc1edffb497c0ed56e66054f897b20 (patch) | |
tree | cf8cd1ef400929263e1e80a24a0717745fef2a96 | |
parent | c32d4f3cd0c19c0cf1a96207adc253f6073014d4 (diff) | |
download | novnc-11ae8f0ef4dc1edffb497c0ed56e66054f897b20.tar.gz |
Add comment for browser and platform detection
-rw-r--r-- | core/util/browser.js | 7 |
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); } |