Skip to content

Interface: BrowserService

TypeScript interface defining the complete structure and capabilities of the browser detection service.

This interface provides type safety and IntelliSense support for all browser detection categories including platforms, browsers, viewports, input capabilities, modern web features, and environment detection.

Properties

PropertyModifierTypeDescription
browserreadonlyParserRaw Bowser parser instance for advanced detection needs
browsersreadonly{ chrome: boolean; cordova: boolean; edge: boolean; electron: boolean; firefox: boolean; opera: boolean; safari: boolean; }Browser and runtime environment detection flags
browsers.chromereadonlybooleanTrue if running in Google Chrome
browsers.cordovareadonlybooleanTrue if running in Cordova/PhoneGap environment
browsers.edgereadonlybooleanTrue if running in Microsoft Edge
browsers.electronreadonlybooleanTrue if running in Electron application
browsers.firefoxreadonlybooleanTrue if running in Mozilla Firefox
browsers.operareadonlybooleanTrue if running in Opera browser
browsers.safarireadonlybooleanTrue if running in Safari browser
connectionreadonly{ https: boolean; }-
connection.httpsreadonlyboolean-
featuresreadonly{ intersection: boolean; popover: boolean; resizeObserver: boolean; serviceWorker: boolean; visualViewport: boolean; }Modern web API and feature support detection flags
features.intersectionreadonlybooleanTrue if Intersection Observer API is supported
features.popoverreadonlybooleanTrue if Popover API is supported
features.resizeObserverreadonlybooleanTrue if ResizeObserver API is supported
features.serviceWorkerreadonlybooleanTrue if Service Worker API is supported
features.visualViewportreadonlybooleanTrue if Visual Viewport API is supported
hidreadonly{ touch: boolean; }Human Interface Device (HID) capabilities
hid.touchreadonlybooleanTrue if device supports touch input (mobile or tablet)
platformsreadonly{ android: boolean; ios: boolean; linux: boolean; mac: boolean; win: boolean; }Operating system and platform detection flags
platforms.androidreadonlybooleanTrue if running on Android OS
platforms.iosreadonlybooleanTrue if running on iOS (iPhone/iPad)
platforms.linuxreadonlybooleanTrue if running on Linux OS
platforms.macreadonlybooleanTrue if running on macOS
platforms.winreadonlybooleanTrue if running on Windows OS
ssrreadonlybooleanTrue if running in server-side rendering environment
viewportsreadonly{ desktop: boolean; mobile: boolean; tablet: boolean; }Device viewport and form factor detection flags
viewports.desktopreadonlybooleanTrue if device has desktop viewport characteristics
viewports.mobilereadonlybooleanTrue if device has mobile viewport characteristics
viewports.tabletreadonlybooleanTrue if device has tablet viewport characteristics