isChrome (XSPUserAgent - JavaScript)

Checks if the browser is Chrome.

Syntax

isChrome() : boolean

isChrome(min:double, max:double) : boolean

Parameters Description
min The minimum acceptable version inclusive.
max The maximum acceptable version inclusive.
Return value Description
boolean true if the browser is Chrome and (if specified) within the acceptable range; false otherwise.

Examples

This computed field displays a message if the browser is not Firefox, or the version is not acceptable:
if(!context.getUserAgent().isChrome()) {
	return "You must use Chrome - The Mgt"
} else {
	if(!context.getUserAgent().isChrome(2.0.164.0, 2.0.164.0)) {
		return "You must upgrade Chrome - The Mgt"
	}
}