@progress/kendo-angular-common
Version:
Kendo UI for Angular - Utility Package
25 lines (24 loc) • 1.02 kB
JavaScript
/**-----------------------------------------------------------------------------------------
* Copyright © 2025 Progress Software Corporation. All rights reserved.
* Licensed under commercial license. See LICENSE.md in the project root for more information
*-------------------------------------------------------------------------------------------*/
import { detectDesktopBrowser, detectMobileOS } from "@progress/kendo-common";
/**
* @hidden
*
* Returns true if the used browser is Safari.
*/
export const isSafari = (userAgent) => {
return detectDesktopBrowser(userAgent).safari ||
(detectMobileOS(userAgent) && detectMobileOS(userAgent).browser === 'mobilesafari');
};
/**
* @hidden
*
* Returns true if the used browser is Firefox.
*/
export const isFirefox = (userAgent) => {
const desktopBrowser = detectDesktopBrowser(userAgent);
const mobileOS = detectMobileOS(userAgent);
return (desktopBrowser && desktopBrowser.mozilla) || (mobileOS && mobileOS.browser === 'firefox');
};