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 PropertybrowserName
String

The name of the detected browser


Required PropertybrowserVersion
Number

The version of the detected browser


Required Propertychrome
Number

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


Required Propertyfirefox
Number

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


Required Propertysafari
Number

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


Required PropertytouchEvent
Boolean

true if the browser has native touch events


Required PropertytouchScreen
Boolean

true if the platform has a touch screen


Required Propertytype
String

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