Options
All
  • Public
  • Public/Protected
  • All
Menu

Class DeviceSpecifications

namespace

DeviceSpecifications

class

DeviceSpecifications

param

Provide a user agent, if none is provided navigator.useragent will be used by default.

param

Provide a string[] of a browserslist to manually overide the default value: ['last 5 versions', '> 3%', 'not ie <= 11']

Hierarchy

  • DeviceSpecifications

Index

Constructors

constructor

  • new DeviceSpecifications(UserAgentString?: undefined | string, browserslist?: string[]): DeviceSpecifications
  • Parameters

    • Optional UserAgentString: undefined | string

      Provide a user agent, if none is provided navigator.useragent will be used by default.

    • Optional browserslist: string[]

      Provide a string[] of a browserslist to manually overide the default value: ['last 5 versions', '> 3%', 'not ie <= 11']

    Returns DeviceSpecifications

Properties

Private _agent

_agent: Agent

Private _browsersList

_browsersList: string[]

userAgentString

userAgentString: string

Returns the used useragent

Methods

getBrowser

getDevice

getOperatingSystem

  • getOperatingSystem(): IOS

isBrowserModern

  • isBrowserModern(): boolean
  • Returns if the browser is up to date using browserslist. Keep the library up-to-date to keep this functionality working properly

    Warning: this is general detection if the browser is a modern browser, it is not a replacement of feature detection libraries like mordernizer.

    method

    isBrowserModern

    Returns boolean

Generated using TypeDoc