Skip to content
Enact

core/platform

Utilities for detecting basic platform capabilities.

Provides basic information about the running platform.

detect(  ) → PlatformDescription

Returns the core/platformcore/platform.platform object.

0 Params
Returns
 PlatformDescription

The core/platformcore/platform.platform object

Required Property • browserName
String

The name of the detected browser


Required Property • browserVersion
Number

The version of the detected browser


Required Property • chrome
Number

The version of the detected browser, if chrome browser is detected


Required Property • firefox
Number

The version of the detected browser, if firefox browser is detected


Required Property • safari
Number

The version of the detected browser, if safari browser is detected


Required Property • touchEvent
Boolean

true if the browser has native touch events


Required Property • touchScreen
Boolean

true if the platform has a touch screen


Required Property • type
String

The type of the detected platform. One of 'desktop', 'mobile', 'webos', 'node', or 'unknown'