platform
Global namespace that stores flags regarding platform environment and features support.
if (pc.platform.touch) {
// touch is supported
}
Summary
Static Properties
android | True if running on an Android device. |
browser | Convenience boolean indicating whether we're running in the browser. |
desktop | True if running on a desktop or laptop device. |
environment | String identifying the current runtime environment. |
gamepads | True if the platform supports gamepads. |
global | The global object. |
ios | True if running on an iOS device. |
mobile | True if running on a mobile or tablet device. |
touch | True if the supports touch input. |
workers | True if the platform supports Web Workers. |
xbox | True if running on an Xbox device. |
Details
Static Properties
android | True if running on an Android device. |
browser | Convenience boolean indicating whether we're running in the browser. |
desktop | True if running on a desktop or laptop device. |
environment | String identifying the current runtime environment. Either 'browser' or 'node'. |
gamepads | True if the platform supports gamepads. |
global | The global object. This will be the window object when running in a browser and the global object when running in nodejs. |
ios | True if running on an iOS device. |
mobile | True if running on a mobile or tablet device. |
touch | True if the supports touch input. |
workers | True if the platform supports Web Workers. |
xbox | True if running on an Xbox device. |