env
Variable: env
Section titled “Variable: env”const env: object;Type declaration
Section titled “Type declaration”getBrowser()
Section titled “getBrowser()”getBrowser: () => object;Gets browser info (IE, Firefox, Safari).
Returns
Section titled “Returns”object
firefox
Section titled “firefox”firefox: boolean;ie: boolean;safari
Section titled “safari”safari: boolean;getDevice()
Section titled “getDevice()”getDevice: () => object;Detects if the device is iOS or Android.
Returns
Section titled “Returns”object
android
Section titled “android”android: boolean;ios: boolean;getMouseCoords()
Section titled “getMouseCoords()”getMouseCoords: (e) => object;Gets mouse or touch coordinates from an event.
Parameters
Section titled “Parameters”| Parameter | Type | Description |
|---|---|---|
e | MouseEvent | TouchEvent | TriggeredEvent<any, any, any, any> |
Returns
Section titled “Returns”object
x: number;y: number;getUserAgent()
Section titled “getUserAgent()”getUserAgent: () => string;Gets the user agent string in lowercase.
Returns
Section titled “Returns”string
isMac()
Section titled “isMac()”isMac: () => boolean;Checks if the current OS is Mac.
Returns
Section titled “Returns”boolean
isPhone()
Section titled “isPhone()”isPhone: () => boolean;Checks if the device is a phone (max-width: 767px).
Returns
Section titled “Returns”boolean