UNPKG

1.91 kBTypeScriptView Raw
1/**
2 * @license
3 * Copyright 2020 Google LLC
4 *
5 * Licensed under the Apache License, Version 2.0 (the "License");
6 * you may not use this file except in compliance with the License.
7 * You may obtain a copy of the License at
8 *
9 * http://www.apache.org/licenses/LICENSE-2.0
10 *
11 * Unless required by applicable law or agreed to in writing, software
12 * distributed under the License is distributed on an "AS IS" BASIS,
13 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14 * See the License for the specific language governing permissions and
15 * limitations under the License.
16 */
17/**
18 * Enums for Browser name.
19 */
20export declare const enum BrowserName {
21 ANDROID = "Android",
22 BLACKBERRY = "Blackberry",
23 EDGE = "Edge",
24 FIREFOX = "Firefox",
25 IE = "IE",
26 IEMOBILE = "IEMobile",
27 OPERA = "Opera",
28 OTHER = "Other",
29 CHROME = "Chrome",
30 SAFARI = "Safari",
31 SILK = "Silk",
32 WEBOS = "Webos"
33}
34/**
35 * Determine the browser for the purposes of reporting usage to the API
36 */
37export declare function _getBrowserName(userAgent: string): BrowserName | string;
38export declare function _isFirefox(ua?: string): boolean;
39export declare function _isSafari(userAgent?: string): boolean;
40export declare function _isChromeIOS(ua?: string): boolean;
41export declare function _isIEMobile(ua?: string): boolean;
42export declare function _isAndroid(ua?: string): boolean;
43export declare function _isBlackBerry(ua?: string): boolean;
44export declare function _isWebOS(ua?: string): boolean;
45export declare function _isIOS(ua?: string): boolean;
46export declare function _isIOS7Or8(ua?: string): boolean;
47export declare function _isIOSStandalone(ua?: string): boolean;
48export declare function _isIE10(): boolean;
49export declare function _isMobileBrowser(ua?: string): boolean;
50export declare function _isIframe(): boolean;