This is the Moff plugin which detects OS, browser, HTML5 and CSS3 features support.


Determines whether browser support application cache object for the window.

Returns boolean.

if (Moff.detect.applicationCache) {
	// do something...


Determines built-in media support via <audio> element.
This object contains the list of audio formats with boolean values.

Returns object.

ogg - Browser supports audio/ogg audio format.
mp3 - Browser supports audio/mpeg audio format.
wav - Browser supports audio/wav audio format.
m4a - Browser supports audio/x-m4a or audio/aac audio format.

if ( {
	// auto mp3 is supported by browser


Object with user browser name and version. Pay attention Internet Explorer 11 won't be matched as msie because browser detection is based on navigator.userAgent. Better try to user feature-specific detected code then browser.

Returns object with of the keys:

chrome - Google Chrome
mozilla - Mozilla Firefox
msie - Internet Explorer
opera - Opera
webkit - Webkit based browser
edge - Microsoft Edge

Browser version is stored in version key.

if ( {
	// user browser is Google Chrome

Moff.detect.browser.version; // 42.0.2311.90


Determines whether browser support <canvas> HTML element.

Returns boolean.

if (Moff.detect.canvas) {
	// browser support canvas


Determines whether browser support canvas 2D fillText method.

if (Moff.detect.canvasText) {
	// canvas 2D fillText is supported


Determines whether browser support draggable or ondragstart, ondrop events.

Returns boolean.

if (Moff.detect.dragAndDrop) {
	// realize drag and drop feature


Flag to determine whether window hashchange event is supported.

Returns boolean.

if (Moff.detect.hashChange) {
	// hashchange event is supported


Detection of HTML5 History API pushState support.

Returns boolean.

if (Moff.detect.history) {
	// pushState is supported


Indicates if the browser support persistently stored data. This property contains indexedDB object or false.

Returns boolean .

if (Moff.detect.indexedDB) {
	// browser's indexed data base is supported


Determines whether user devices is mobile.

Returns boolean.

if (Moff.detect.isMobile) {
	// user devices is mobile


Flag to determine whether browser support local storage object.

Returns boolean.

if (Moff.detect.localStorage) {
	// browser support local storage object


Object which contains user OS name.

Returns object with one of the following keys:

iOS - Apple iOS
macOS - Apple Mac OS
windows - Microsoft Windows OS
android - Google Android OS
windowsPhone - Microsoft Windows Phone OS

if ( {
	// user OS is android


Determines whether browser support window.postMessage method.

Returns boolean.

if (Moff.detect.postMessage) {
	// window postMessage is supported


Flag to determine whether browser support session storage.

Returns boolean.

if (Moff.detect.sessionStorage) {
	// window.sessionStorage is supported


Determines does the browser support passed CSS3 property.

Returns boolean.


property - CSS3 property

if (Moff.detect.supportCSS3('transition')) {
	// browser supports CSS3 transition property


Indicates if the browser supports touch events, which does not necessarily reflect a touchscreen device.

Returns boolean.

if (Moff.detect.touch) {
	// browser support touch events.


Determine whether the browser support <video> HTML5 element.

Returns object with supported video formats:

ogg - Browser supports video/ogg format.
h264 - Browser supports video/mp4 format.
webm - Browser supports video/webm format.

if ( {
	// browser can play video/mp4 format


Flag to indicates if the browser support web sockets.

Returns boolean.

if (Moff.detect.webSockets) {
	// your browser supports Web sockets


Determine if the browser support web workers.

Returns boolean.

if (Moff.detect.webWorkers) {
	// browser supports Web workers