Platform.js Copyright 2014-2018 Benjamin Tan Copyright 2011-2013 John-David Dalton Available under MIT license
- Source:
Members
(static) description :string|null
The platform description.
Type:
- string | null
- Source:
(static) layout :string|null
The name of the browser's layout engine.
The list of common layout engines include: "Blink", "EdgeHTML", "Gecko", "Trident" and "WebKit"
Type:
- string | null
- Source:
(static) manufacturer :string|null
The name of the product's manufacturer.
The list of manufacturers include: "Apple", "Archos", "Amazon", "Asus", "Barnes & Noble", "BlackBerry", "Google", "HP", "HTC", "LG", "Microsoft", "Motorola", "Nintendo", "Nokia", "Samsung" and "Sony"
Type:
- string | null
- Source:
(static) name :string|null
The name of the browser/environment.
The list of common browser names include: "Chrome", "Electron", "Firefox", "Firefox for iOS", "IE", "Microsoft Edge", "PhantomJS", "Safari", "SeaMonkey", "Silk", "Opera Mini" and "Opera"
Mobile versions of some browsers have "Mobile" appended to their name: eg. "Chrome Mobile", "Firefox Mobile", "IE Mobile" and "Opera Mobile"
Type:
- string | null
- Source:
(static) os :Object
The name of the operating system.
Type:
- Object
- Source:
(static) platform :Object
The platform object.
Type:
- Object
- Source:
(static) prerelease :string|null
The alpha/beta release indicator.
Type:
- string | null
- Source:
(static) product :string|null
The name of the product hosting the browser.
The list of common products include:
"BlackBerry", "Galaxy S4", "Lumia", "iPad", "iPod", "iPhone", "Kindle", "Kindle Fire", "Nexus", "Nook", "PlayBook", "TouchPad" and "Transformer"
Type:
- string | null
- Source:
(static) toString
Returns platform.description
when the platform object is coerced to a string.
- Source:
(static) ua :string|null
The browser's user agent string.
Type:
- string | null
- Source:
(static) version :string|null
The browser/environment version.
Type:
- string | null
- Source:
Methods
(static) parse(uaopt) → {Object}
Creates a new platform object.
Parameters:
Name | Type | Attributes | Default | Description |
---|---|---|---|---|
ua |
Object | string |
<optional> |
navigator.userAgent | The user agent string or context object. |
- Source:
Returns:
A platform object.
- Type
- Object