Skip to content
garafu edited this page Apr 30, 2013 · 4 revisions

public static property.
This object has follwing properties, and methods.

  • Properties
  • .original
  • .tablet
  • .mobile
  • .windows
  • .mac
  • .linux
  • .unknown
  • Methods
  • .initialize( string )
  • .is( string )

.original

type : string
This property has identified string of platform type.

.tablet

type : boolean
Get the value indicating whether the platform is "tablet" or not. When client is iPad or Android tablet, this property indicates true.

.mobile

type : boolean
Get the value indicating whether the platform is "mobile phone" or not. When client is Android phone, iPhone, iPod, Windows Phone, BlackBerry or Symbian, this property indicates true.

.windows

type : boolean
Get the value indicating whether the platform is "window" or not.

.mac

type : boolean
Get the value indicating whether the platform is "Macintosh" or not.

.linux

type : boolean
Get the value indicating whether the platform is "Linux" or not.

.unknown

type : boolean
Get the value indicating whether the client platform can not detect.

.initialize( string )

Initialize PlatformInfo class instance. This method set properties according to the given string.

Syntax:

private {void} initialize(
        {string} useragent
)

Parameter:

  • {string} useragent
    userAgent string.

Return:

  • {void}
    no return value.

.is( string )

Get the value indicating whether the current browser is equal to the specified browser or not.

Syntax:

public {boolean} is(
        {string} type
)

Parameter:

  • {string} type
    Platform type string.

Return:

  • {boolean}
    Whether the current platform is equal to the specified platform type.

Clone this wiki locally