@xslet/platform ver.0.2 - API document


API for Javascript

xslet.platform.ua.name

The browser name in upper case characters. (ex. 'FIREFOX', 'MSIE', 'CHROME').

Type: string

xslet.platform.ua.version

The browser version which concatenates natural numbers by dots. (ex. '48', '10.0').

Type: string

xslet.platform.ua.NAME

The flag of which the name is the browser name in upper case.

Type: boolean

xslet.platform.os.name

The OS name in upper case characters. (ex. 'WINNT', 'LINUX', 'IPHONE')

Type: string

xslet.platform.os.version

The OS version which concatenates natural numbers by dots. (ex. '48', '10.0').

Type: string

xslet.platform.os.NAME

The flag of which the name is the OS name in upper case.

Type: boolean

xslet.platform.ua.lt(NAME, VERSION)

Compares the current browser to the given name and version.

Parameters:

Parameter Type Description
NAME string The browser name in upper case characters.
VERSION string The browser version which concatenates natural numbers by dots.

Returns:

Returns true if the browser is less than the specified version.

Type: boolean

xslet.platform.ua.lte(NAME, VERSION)

Compares the current browser to the given name and version.

Parameters:

Parameter Type Description
NAME string The browser name in upper case characters.
VERSION string The browser version which concatenates natural numbers by dots.

Returns:

Returns true if the browser is less than or equal to the specified version.

Type: boolean

xslet.platform.ua.gt(NAME, VERSION)

Compares the current browser to the given name and version.

Parameters:

Parameter Type Description
NAME string The browser name in upper case characters.
VERSION string The browser version which concatenates natural numbers by dots.

Returns:

Returns true if the browser is greater than the specified version.

Type: boolean

xslet.platform.ua.gte(NAME, VERSION)

Compares the current browser to the given name and version.

Parameters:

Parameter Type Description
NAME string The browser name in upper case characters.
VERSION string The browser version which concatenates natural numbers by dots.

Returns:

Returns true if the browser is greater than or equal to the specified version.

Type: boolean

xslet.platform.ua.eq(NAME, VERSION)

Compares the current browser to the given name and version.

Parameters:

Parameter Type Description
NAME string The browser name in upper case characters.
VERSION string The browser version which concatenates natural numbers by dots.

Returns:

Returns true if the browser is equal to the specified version.

Type: boolean

xslet.platform.ua.ne(NAME, VERSION)

Compares the current browser to the given name and version.

Parameters:

Parameter Type Description
NAME string The browser name in upper case characters.
VERSION string The browser version which concatenates natural numbers by dots.

Returns:

Returns true if the browser is not equal to the specified version.

Type: boolean

xslet.platform.os.lt(NAME, VERSION)

Compares the current browser to the given name and version.

Parameters:

Parameter Type Description
NAME string The browser name in upper case characters.
VERSION string The browser version which concatenates natural numbers by dots.

Returns:

Returns true if the OS is less than the specified version.

Type: boolean

xslet.platform.os.lte(NAME, VERSION)

Compares the current browser to the given name and version.

Parameters:

Parameter Type Description
NAME string The browser name in upper case characters.
VERSION string The browser version which concatenates natural numbers by dots.

Returns:

Returns true if the OS is less than or equal to the specified version.

Type: boolean

xslet.platform.os.gt(NAME, VERSION)

Compares the current browser to the given name and version.

Parameters:

Parameter Type Description
NAME string The browser name in upper case characters.
VERSION string The browser version which concatenates natural numbers by dots.

Returns:

Returns true if the OS is greater than the specified version.

Type: boolean

xslet.platform.os.gte(NAME, VERSION)

Compares the current browser to the given name and version.

Parameters:

Parameter Type Description
NAME string The browser name in upper case characters.
VERSION string The browser version which concatenates natural numbers by dots.

Returns:

Returns true if the OS is greater than or equal to the specified version.

Type: boolean

xslet.platform.os.eq(NAME, VERSION)

Compares the current browser to the given name and version.

Parameters:

Parameter Type Description
NAME string The browser name in upper case characters.
VERSION string The browser version which concatenates natural numbers by dots.

Returns:

Returns true if the OS is equal to the specified version.

Type: boolean

xslet.platform.os.ne(NAME, VERSION)

Compares the current browser to the given name and version.

Parameters:

Parameter Type Description
NAME string The browser name in upper case characters.
VERSION string The browser version which concatenates natural numbers by dots.

Returns:

Returns true if the browser is not equal to the specified version.

Type: boolean

API for CSS

html.UA-NAME

Is used to change style applications for each browser.

html.UA-NAME-VERSION

Is used to change style applications for each version of browsers.

html.OS-NAME

Is used to change style applications for each OS.

html.OS-NAME-VERSION

Is used to change style applications for each version of OSs.