isSafari (XSPUserAgent - JavaScript)

Checks if the browser is Safari.

Syntax

isSafari() : boolean

isSafari(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 Safari and (if specified) within the acceptable range; false otherwise.

Examples

This computed field displays a message if the browser is not Opera, or the version is not acceptable:
if(!context.getUserAgent().isSafari()) {
	return "You must use Safari - The Mgt"
} else {
	if(!context.getUserAgent().isSafari(3.0, 3.1)) {
		return "You must upgrade Safari - The Mgt"
	}
}