Helper JavaScript
Small functions that help GSD.
Function | Purpose | Usage | ACE Core |
---|---|---|---|
Detect Browser | Returns an object with the name and version details of the user's browser. Note this should only be used in cases where feature detection is not sufficient, or in cases where content or behaviour must always and permanently vary between operating systems. An example use case is providing per-browser instructions on how to save files or configure the browser. |
Call:
Example result:
|
|
Detect Operating System | Returns a string identifying the operating system. Should only be used where content or behaviour must always and permanently vary between operating systems, for example keyboard shortcuts which are OS-specific. |
Call:
Returns a string identifying the operating system, one of 'windows', 'mac', 'linux', 'android', 'ios' or 'windowsphone'. If the version is not detected, returns 'os-undetected'. |
|
ACE Version | Returns the version number of ACE. Useful if you have any code which needs to support more than one version of ACE. |
|