Add comment for browser and platform detection

This commit is contained in:
Samuel Mannehed 2019-10-24 16:43:07 +02:00 committed by Lauri Kasanen
parent e7a5aa271e
commit 2f43cead79

View File

@ -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);
}