isFirefox (XSPUserAgent - JavaScript)

Checks if the browser is Firefox.

Syntax

isFirefox() : boolean

isFirefox(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 Firefox 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().isFirefox()) {
	return "You must use Firefox - The Mgt"
} else {
	if(!context.getUserAgent().isFirefox(3.0, 3.0)) {
		return "You must upgrade Firefox - The Mgt"
	}
}