Members
(static, constant) OPTIONAL
List of all optional (or recommended) browser features. These are not used in built-in libraries and apps, but will be in the future.
- Source:
- RapidContext_Browser.js, line 129
(static, constant) REQUIRED
List of all required browser features.
- Source:
- RapidContext_Browser.js, line 21
Methods
(static) cookie(nameopt, valueopt) → {Object|string}
Gets, sets or removes browser cookies.
- Parameters:
-
Name Type Attributes Description name
{string} <optional>
the cookie name to get/set value
{string} <optional>
the cookie value to set, or null to remove - Returns:
- {Object|string} all cookie values or a single value
- Source:
- RapidContext_Browser.js, line 345
(static) info(userAgentopt) → {Object}
Returns browser information version and platform information.
- Parameters:
-
Name Type Attributes Description userAgent
{string} <optional>
the agent string, or undefined for this browser - Returns:
- {Object} a browser meta-data object
- Source:
- RapidContext_Browser.js, line 257
(static) isSupported() → {boolean}
Checks if the browser supports all required APIs.
- Parameters:
-
Type Description - Returns:
- {boolean} true if the browser is supported, or false otherwise
- Source:
- RapidContext_Browser.js, line 178
(static) supports(…feature) → {boolean}
Checks for browser support for one or more specified APIs. Supports checking JavaScript APIs, JavaScript syntax and CSS support.
- Parameters:
-
Name Type Attributes Description feature
{string|Object|Array} <repeatable>
one or more features to check - Returns:
-
{boolean}
true
if supported, orfalse
otherwise - Example:
-
RapidContext.Browser.supports("Array.isArray") ==> true; RapidContext.Browser.supports({ test: "let a = 2; a === 2", name: "Let statements" }) ==> true; RapidContext.Browser.supports("display: flex") ==> false;
- Source:
- RapidContext_Browser.js, line 203