Skip to content

API / geotoolkit / util / BrowserInfo / BrowserInfo

Class: BrowserInfo

util.BrowserInfo.BrowserInfo

Defines the utility class that returns browser info

Table of contents

Constructors
  • [new BrowserInfo()](/solutions/geotoolkit/GeoToolkit_JS/apis/classes/geotoolkit.util.browserinfo.browserinfo.md#new browserinfo())
Methods

Contents

Constructors

new BrowserInfo()

• new BrowserInfo()

Methods

getLanguage

▸ Static getLanguage(): string

Language

Returns

string


getVersion

▸ Static getVersion(): string

Version

Returns

string


isChrome

▸ Static isChrome(): boolean

if Chrome browser

Returns

boolean


isEdge

▸ Static isEdge(): boolean

if Edge browser

Returns

boolean


isFirefox

▸ Static isFirefox(): boolean

if Firefox browser

Returns

boolean


isIE

▸ Static isIE(): boolean

if IE browser

Deprecated

since 4.1.

Returns

boolean


isIOS

▸ Static isIOS(): boolean

if iOS's browser

Returns

boolean


isMac

▸ Static isMac(): boolean

if Mac / iPad device

Returns

boolean


isMobile

▸ Static isMobile(): boolean

if the browser is running on a mobile device Primary check uses navigator.userAgentData API, some browsers do not support it according to https://developer.mozilla.org/en-US/docs/Web/API/Navigator/userAgentData Secondary check uses navigator.userAgent. In some cases the userAgent can be configured by user and might cause unreliable detection result. Because iPads running Safari are automatically spoofed as Macintosh devices, we estimate that 'Macintosh with touchscreen' are camouflaged iPad. If the device is an actual Macintosh with a touch-capable monitor, running Safari, this will still return true.

Returns

boolean


isOpera

▸ Static isOpera(): boolean

if Opera browser

Returns

boolean


isReactNative

▸ Static isReactNative(): boolean

if React Native environment

Returns

boolean


isSafari

▸ Static isSafari(): boolean

if Safari browser

Returns

boolean


isTouchScreen

▸ Static isTouchScreen(): boolean

if device uses touchscreen

Returns

boolean


isUsingBrowser

▸ Static isUsingBrowser(): boolean

if using browser

Returns

boolean


supportWasm

▸ Static supportWasm(): boolean

if PlatformPreview6Plus

Returns

boolean