Smart.Framework Logo

static class smartJ$TestBrowser
{ } .

CLASS :: Smart BrowserTest (ES6)
The class provide a Browser Compliance Check for JavaScript


class Methods

public static function checkIsMobileDevice ( {Boolean} skipFallbackOnscreenSize ) {} . {Boolean}
@hint: It is a very basic but effective and quick detection
@return: {Boolean} will return TRUE if Browser seems to be a Mobile Devices, FALSE if not
@param: {Boolean} skipFallbackOnscreenSize *Optional* Default is FALSE ; If set to TRUE will skip the fallback on screensize which may be innacurate
Detect if the Browser is on a mobile device.
public static checkCookies = ( ) => {} . {Boolean}
@hint: If a browser show that does not supports Cookies may be a situation like user disabled cookies in the browser or is a really unusual or old browser
@return: {Boolean} will return TRUE if Browser supports Cookies and cookies are enabled, FALSE if not or cookies are disabled
Detect if a Browser support Cookies or does not have the Cookies disabled or even may not support cookies.
Sample code: JavaScript
if(!smartJ$TestBrowser.checkCookies()) { alert('NOTICE: Your browser does not support Cookies !'); }

class Properties


class Constants

public static const param_isMobile = 'auto' ;  . {String}
set [before] smartJ$Options .BrowserTest.isMobile
get N/A
If set to 'yes' or 'no' will disable the javascript detection for checkIsMobileDevice() which will return always TRUE if set to 'yes' and always FALSE if set to 'no'
This can be used to detect mobile devices by the backend (PHP) and skip the detection from javascript side


documentation generated on: 2023-10-19 23:19:05 +0000


Smart.Framework © 2009-2023 unix-world.org