GlideUICompatibility - Scoped

The scoped GlideUICompatibility class provides the ability for scoped applications to define their own minimum browser versions. This is done by creating system properties for the scoped application.

You create the properties using the sys_properties list and assign a version number. When you do this from the scoped application, the <scope-name> prefix is automatically added to the property name. The scoped application UI compatibility properties are:

  • <scope-name>.ui.ie_minimum
  • <scope-name>.ui.chrome_minimum
  • <scope-name>.ui.firefox_minimum
  • <scope-name>.ui.safari_major_version_minimum

You can then use the scoped GlideUICompatibility class to determine if the current browser is supported.

Scoped GlideUICompatibility - getCompatibility()

Returns the terms "block" or "allow" based upon the browser version.

Table 1. Parameters
Name Type Description
Table 2. Returns
Type Description
String Either block or allow
UICompatibility = new GlideUICompatibility(gs.getCurrentScopeName());
var blockOrAllow = UICompatibility.getCompatibility();;

Output: allow

Scoped GlideUICompatibility - GlideUICompatibility(String scopeName)

Creates a GlideUICompatibility object.

Table 3. Parameters
Name Type Description
scopeName String The application's scope name

Scoped GlideUICompatibility - isBlocked()

Determines if the browser is not supported.

Table 4. Parameters
Name Type Description
Table 5. Returns
Type Description
Boolean True if the browser is not supported.

UICompatibility = new GlideUICompatibility(gs.getCurrentScopeName());
var blocked = UICompatibility.isBlocked();;

Output: false