Methods

This section describes the members used to manipulate the object.

current()

Returns information about the current device.

Return Value: Object

An object containing information about the current device.

The returned object contains the following Boolean fields, which indicate whether or not the device is of a certain type: phone, tablet, android, ios, win8, tizen and the platform string field, which indicates the current platform ("android", "win8", "ios" or "tizen").

Show Example:
jQuery

current(deviceName)

Overrides the actual device information to force the application to operate as if it were running on the specified device.

Parameters:
deviceName: String

The required device name. The parameter can take one of the following values: "iPhone", "iPhone5", "iPad", "iPadMini", "androidPhone", "androidTablet", "win8", "win8Phone", "msSurface", "desktop" and "tizen".

The returned object contains the following Boolean fields, which indicate if the device is of a certain type: phone, tablet, android, ios, win8, tizen and the platform string field, indicating the current platform ("android", "win8", "ios" or "tizen").

Show Example:
jQuery