Detects support for the API that provides information about the ambient light levels, as detected by the device's light detector, in terms of lux units.
ambientlight
Detects support for the Application Cache, for storing data to enable web-based applications run offline.
The API has been heavily criticized and discussions are underway to address this.
applicationcache
Detects the audio element
audio
Detect support for the Battery API, for accessing information about the system's battery charge level.
batteryapi
Detects support for the Blob constructor, for creating file-like objects of immutable, raw data.
blobconstructor
Detects support for the <canvas> element for 2D drawing.
canvas
Detects support for the text APIs for <canvas> elements.
canvastext
Detects support for the contenteditable attribute of elements, allowing their DOM text contents to be edited directly by the user.
contenteditable
Detects support for custom context menus.
contextmenu
Detects whether cookie support is enabled.
cookies
Detects support for Cross-Origin Resource Sharing: method of performing XMLHttpRequests across domains.
cors
Detects support for the cryptographic functionality available under window.crypto.subtle
cryptography
Detects support for the Custom Elements API, to create custom html elements via js
customelements
Detects support for the window.registerProtocolHandler() API to allow websites to register themselves as possible handlers for particular protocols.
customprotocolhandler
Detects support for CustomEvent.
customevent
Detects native support for the Dart programming language.
dart
Detects support for the DataView interface for reading data from an ArrayBuffer as part of the Typed Array spec.
dataview
Detects support for emoji character sets.
emoji
Detects native support for addEventListener
eventlistener
Detects support for EXIF Orientation in JPEG images.
iOS looks at the EXIF Orientation flag in JPEGs and rotates the image accordingly. Most desktop browsers just ignore this data.
exiforientation
Detects Flash support as well as Flash-blocking plugins
flash
Tests whether the browser supports the detection of Force Touch Events. Force Touch Events allow custom behaviours and interactions to take place based on the given pressure or change in pressure from a compatible trackpad.
Force Touch events are available in OS X 10.11 and later on devices equipped with Force Touch trackpads.
forcetouch
Detects support for the ability to make the current website take over the user's entire screen
fullscreen
Detects support for the Gamepad API, for access to gamepads and controllers.
gamepads
Detects support for the Geolocation API for users to provide their location to web applications.
geolocation
Detects support for the hashchange event, fired when the current location fragment changes.
hashchange
Detects overlay scrollbars (when scrollbars on overflowed blocks are visible). This is found most commonly on mobile and OS X.
hiddenscroll
Detects support for the History API for manipulating the browser session history.
history
Detects support for HTML import, a feature that is used for loading in Web Components.
htmlimports
Detects whether or not the current browser is IE8 in compatibility mode (i.e. acting as IE7).
ie8compat
Detects support for the IndexedDB client-side storage API (final spec).
indexeddb
Detects if the browser can save File/Blob objects to IndexedDB
indexeddbblob
Detects support for HTML5 <input> element attributes and exposes Boolean subproperties with the results:
Modernizr.input.autocomplete
Modernizr.input.autofocus
Modernizr.input.list
Modernizr.input.max
Modernizr.input.min
Modernizr.input.multiple
Modernizr.input.pattern
Modernizr.input.placeholder
Modernizr.input.required
Modernizr.input.step
input
There is a custom search event implemented in webkit browsers when using an input[search] element.
search
Detects support for HTML5 form input types and exposes Boolean subproperties with the results:
Modernizr.inputtypes.color
Modernizr.inputtypes.date
Modernizr.inputtypes.datetime
Modernizr.inputtypes['datetime-local']
Modernizr.inputtypes.email
Modernizr.inputtypes.month
Modernizr.inputtypes.number
Modernizr.inputtypes.range
Modernizr.inputtypes.search
Modernizr.inputtypes.tel
Modernizr.inputtypes.time
Modernizr.inputtypes.url
Modernizr.inputtypes.week
inputtypes
Detects support for the Internationalization API which allow easy formatting of number and dates and sorting string based on a locale
intl
Detects native support for JSON handling functions.
json
Detects support for OpenType ligatures
ligatures
Detects support for the reversed attribute on the <ol> element.
olreversed
Detects support for MathML, for mathematic equations in web pages.
mathml
Detects support for Message Channels, a way to communicate between different browsing contexts like iframes, workers, etc..
MessageChannel
Detects support for the Notifications API
notification
Detects support for the Page Visibility API, which can be used to disable unnecessary actions and otherwise improve user experience.
pagevisibility
Detects support for the Navigation Timing API, for measuring browser and connection performance.
performance
Detects support for the DOM Pointer Events API, which provides a unified event interface for pointing input devices, as implemented in IE10+, Edge and Blink.
pointerevents
Detects support the pointer lock API which allows you to lock the mouse cursor to the browser window.
pointerlock
Detects support for the window.postMessage protocol for cross-document messaging.
postmessage
Detects support for an API that allows users to get proximity related information from the device's proximity sensor.
proximity
Detects support for querySelector.
queryselector
Detects the ability to request a specific amount of space for filesystem access
quotamanagement
Detects support for the window.requestAnimationFrame API, for offloading animation repainting to the browser for optimized performance.
requestanimationframe
ServiceWorkers (formerly Navigation Controllers) are a way to persistently cache resources to built apps that work better offline.
serviceworker
Detects support for SVG in <embed>or<object> elements.
svg
Template strings are string literals allowing embedded expressions.
templatestrings
Indicates if the browser supports the W3C Touch Events API.
This does not necessarily reflect a touchscreen device:
Modernizr.pointerevents to detect support for thatSee this article: You Can't Detect A Touchscreen.
It's recommended to bind both mouse and touch/pointer events simultaneously – see this HTML5 Rocks tutorial.
This test will also return true for Firefox 4 Multitouch support.
touchevents
Detects support for native binary data manipulation via Typed Arrays in JavaScript.
Does not check for DataView support; use Modernizr.dataview for that.
typedarrays
Detects if unicode characters are supported in the current document.
unicode
Detects support for IE userData for persisting data, an API similar to localStorage but supported since IE5.
userdata
Detects support for the API that provides access to the vibration mechanism of the hosting device, to provide tactile feedback.
vibrate
Detects support for the video element, as well as testing what types of content it supports.
Subproperties are provided to describe support for ogg, h264 and webm formats, e.g.:
Modernizr.video // true
Modernizr.video.ogg // 'probably'
video
Detects support for VML.
vml
Detects native support for the Web Intents APIs for service discovery and inter-application communication.
Chrome added support for this in v19, but removed it again in v24 because of "a number of areas for development in both the API and specific user experience in Chrome". No other browsers currently support it, however a JavaScript shim is available.
webintents
Detects support for the Web Animation API, a way to create css animations in js
animation
websockets
Detects support for XDomainRequest in IE9 & IE8
xdomainrequest
When used on an <a>, this attribute signifies that the resource it points to should be downloaded by the browser rather than navigating to it.
adownload
Detects if an audio element can automatically restart, once it has finished
audioloop
Detects if audio can be downloaded in the background before it starts playing in the <audio> element
audiopreload
Detects the older non standard webaudio API, (as opposed to the standards based AudioContext API)
webaudio
Enable a developer to remove CPU intensive CSS/JS when battery is low
lowbattery
Detects if Photoshop style blending modes are available in canvas.
canvasblending
Determines if winding rules, which controls if a path can go clockwise or counterclockwise
canvaswinding
Detects support for the window.crypto.getRandomValues method for generating cryptographically secure random numbers
getrandomvalues
Detects support for the all css property, which is a shorthand to reset all css properties (except direction and unicode-bidi) to their original value
cssall
Detects whether or not elements can be animated using CSS
cssanimations
Detects support for the appearance css property, which is used to make an element inherit the style of a standard user interface element. It can also be used to remove the default styles of an element, such as input and buttons.
appearance
Detects support for CSS Backdrop Filters, allowing for background blur effects like those introduced in iOS 7. Support for this was added to iOS Safari/WebKit in iOS 9.
backdropfilter
Detects the ability for the browser to composite backgrounds using blending modes similar to ones found in Photoshop or Illustrator.
backgroundblendmode
Detects the ability to control specifies whether or not an element's background extends beyond its border in CSS
backgroundcliptext
Detects if you can use the shorthand method to define multiple parts of an element's background-position simultaniously.
egbackground-position: right 10px bottom 10px
bgpositionshorthand
Detects the ability to control an element's background position using css
bgpositionxy
Detects the ability to use round and space as properties for background-repeat
bgrepeatspacebgrepeatround
Method of allowing calculated values for length units. For example:
//lem {
width: calc(100% - 3em);
}
csscalc
csschunit
cssgridcssgridlegacy
cubicbezierrange
display-runin
display: table and table-cell test. (both are tested under one name table-cell )
displaytable
Tests for CSS.escape() support.
cssescape
cssexunit
Detects support for the Flexible Box Layout model, a.k.a. Flexbox, which allows easy manipulation of layout order and sizing within a container.
flexbox
Detects support for the flex-wrap CSS property, part of Flexbox, which isn’t present in all Flexbox implementations (notably Firefox).
This featured in both the 'tweener' syntax (implemented by IE10) and the 'modern' syntax (implemented by others). This detect will return true for either of these implementations, as long as the flex-wrap property is supported. So to ensure the modern syntax is supported, use together with Modernizr.flexbox:
if (Modernizr.flexbox && Modernizr.flexwrap) {
// Modern Flexbox with `flex-wrap` supported
}
else {
// Either old Flexbox syntax, or `flex-wrap` not supported
}
flexwrap
fontface
Detects support for hidpi/retina hairlines, which are CSS borders with less than 1px in width, for being physically 1px on hidpi screens.
hairline
csshyphenssofthyphenssofthyphensfind
Detects support for the ':invalid' CSS pseudo-class.
cssinvalid
Detects support for the ':nth-child()' CSS pseudo-selector.
nthchild
csspointerevents
regions
cssremunit
Test for CSS 3 UI "resize" property
cssresize
Detects support for CSS Snap Points
scrollsnappoints
subpixelfont
Detects support for the ':target' CSS pseudo-class.
target
csstransformslevel2
Detects support for transform-style: preserve-3d, for getting a proper 3D perspective on elements.
preserve3d
userselect
Detects support for the ':valid' CSS pseudo-class.
cssvalid
variablefonts
Detects support for the will-change css property, which formally signals to the browser that an element will be animating.
willchange
createelementattrscreateelement-attrs
dataset
Append multiple elements to the DOM within a single insertion.
documentfragment
Does the browser support the HTML5 [hidden] attribute?
hidden
Determines if DOM4 MutationObserver support is available.
mutationobserver
Detects support for the passive option to addEventListener.
passiveeventlisteners
Detect support for the bdi element, a way to have text that is isolated from its possibly bidirectional surroundings
bdi
details
picture
progressbarmeter
ruby
texttrackapitrack
Does the browser support HTML with non-standard / new elements?
unknownelements
Check if browser implements ECMAScript 5 Array per specification.
es5array
Check if browser implements ECMAScript 5 Date per specification.
es5date
Check if browser implements ECMAScript 5 Function per specification.
es5function
Check if browser implements ECMAScript 5 Object per specification.
es5object
Check if browser implements everything as specified in ECMAScript 5.
es5
Check if browser implements ECMAScript 5 Object strict mode.
strictmode
Check if browser implements ECMAScript 5 String per specification.
es5string
Check if browser accepts ECMAScript 5 syntax.
es5syntax
Check if browser prevents assignment to global undefined per ECMAScript 5.
es5undefined
Check if browser implements ECMAScript 6 Array per specification.
es6array
Check if browser implements ECMAScript 6 Arrow Functions per specification.
arrow
Check if browser implements ECMAScript 6 Map, Set, WeakMap and WeakSet
es6collections
Check if browser implements ECMAScript 6 String.prototype.contains per specification.
contains
Check if browser implements ECMAScript 6 Generators per specification.
generators
Check if browser implements ECMAScript 6 Math per specification.
es6math
Check if browser implements ECMAScript 6 Number per specification.
es6number
Check if browser implements ECMAScript 6 Object per specification.
es6object
Check if browser implements ECMAScript 6 Promises per specification.
promises
Check if browser implements ECMAScript 6 String per specification.
es6string
Part of Device Access aspect of HTML5, same category as geolocation.
devicemotion tests for Device Motion Event support, returns boolean value true/false.
deviceorientation tests for Device Orientation Event support, returns boolean value true/false
devicemotiondeviceorientation
oninput tests if the browser is able to detect the input event
oninput
filereader tests for the File API specification
Tests for objects specific to the File API W3C specification without being redundant (don't bother testing for Blob since it is assumed to be the File object's prototype.)
filereader
filesystem
When used on an <input>, this attribute signifies that the resource it takes should be generated via device's camera, camcorder, sound recorder.
capture
Detects whether input type="file" is available on the platform
E.g. iOS < 6 and some android version don't support this
fileinput
When used on an <input type="file">, the directory attribute instructs the user agent to present a directory selection dialog instead of the usual file selection dialog.
directory
Detects whether input form="form_id" is available on the platform E.g. IE 10 (and below), don't support this
formattribute
Detects whether input type="number" is capable of receiving and displaying localized numbers, e.g. with comma separator.
localizednumber
Tests for placeholder attribute in inputs and textareas
placeholder
When used with input[autocomplete] to annotate a form, form.requestAutocomplete() shows a dialog in Chrome that speeds up checkout flows (payments specific for now).
requestautocomplete
This implementation only tests support for interactive form validation. To check validation for a specific type or a specific other constraint, the test can be combined:
Modernizr.inputtypes.number && Modernizr.formvalidation (browser supports rangeOverflow, typeMismatch etc. for type=number)Modernizr.input.required && Modernizr.formvalidation (browser supports valueMissing)
formvalidation
Test for sandbox attribute in iframes.
sandbox
Test for seamless attribute in iframes.
seamless
Test for srcdoc attribute in iframes.
srcdoc
Test for animated png support.
apng
Detects support for the crossOrigin attribute on images, which allow for cross domain images inside of a canvas without tainting it
imgcrossorigin
Test for JPEG 2000 support
jpeg2000
Test for JPEG XR support
jpegxr
Test for the sizes attribute on images
sizes
Test for the srcset attribute of images
srcset
Tests for transparent webp support.
webpalpha
Tests for animated webp support.
webpanimation
Tests for non-alpha lossless webp support.
webplosslesswebp-lossless
Tests for lossy, non-alpha webp support.
Tests for all forms of webp support (lossless, lossy, alpha, and animated)..
Modernizr.webp // Basic support (lossy) Modernizr.webp.lossless // Lossless Modernizr.webp.alpha // Alpha (both lossy and lossless) Modernizr.webp.animation // Animated WebP
webp
Detect support for the formaction attribute on form inputs
inputformaction
Detect support for the formenctype attribute on form inputs, which overrides the form enctype attribute
inputformenctype
Detect support for the formmethod attribute on form inputs
inputformmethod
Detect support for the formtarget attribute on form inputs, which overrides the form target attribute
inputformtarget
Detect support for Hover based media queries
hovermq
Detect support for Pointer based media queries
pointermq
Detects support for an API that allows for asynchronous transfer of small HTTP data from the client to a server.
beacon
Tests for determining low-bandwidth via navigator.connection
There are two iterations of the navigator.connection interface.
The first is present in Android 2.2+ and only in the Browser (not WebView)
The second is specced at http://dev.w3.org/2009/dap/netinfo/ and perhaps landing in WebKit
Unknown devices are assumed as fast
For more rigorous network testing, consider boomerang.js: https://github.com/bluesmoon/boomerang/
lowbandwidth
Tests for server sent events aka eventsource.
eventsource
Detects support for the fetch API, a modern replacement for XMLHttpRequest.
fetch
Tests for XMLHttpRequest xhr.responseType='arraybuffer'.
xhrresponsetypearraybuffer
Tests for XMLHttpRequest xhr.responseType='blob'.
xhrresponsetypeblob
Tests for XMLHttpRequest xhr.responseType='document'.
xhrresponsetypedocument
Tests for XMLHttpRequest xhr.responseType='json'.
xhrresponsetypejson
Tests for XMLHttpRequest xhr.responseType='text'.
xhrresponsetypetext
Tests for XMLHttpRequest xhr.responseType.
xhrresponsetype
Tests for XHR2.
xhr2
Detects support for the async attribute on the <script> element.
scriptasync
Detects support for the defer attribute on the <script> element.
scriptdefer
speechrecognition
speechsynthesis
Support for the scoped attribute of the <style> element.
stylescoped
svgasimg
Detects support for clip paths in SVG (only, not on HTML content).
See this discussion regarding applying SVG clip paths to HTML content.
svgclippaths
svgfilters
Detects support for foreignObject tag in SVG.
svgforeignobject
Detects support for inline SVG in HTML (not within XHTML).
inlinesvg
Detect support for the maxlength attribute of a textarea element
textareamaxlength
Detects support for creating Blob URLs
bloburls
Detects support for data URIs. Provides a subproperty to report support for data URIs over 32kb in size:
Modernizr.datauri // true
Modernizr.datauri.over32kb // false in IE8
datauri
Check if browser implements the URL constructor for parsing URLs.
urlparser
Detects support for an API that provides utility methods for working with the query string of a URL.
urlsearchparams
Checks for support of the autoplay attribute of the video element.
videoautoplay
Detects support for the crossOrigin attribute on video tag
videocrossorigin
Detects support for OpenGL extensions in WebGL. It's true if the WebGL extensions API is supported, then exposes the supported extensions as subproperties, e.g.:
if (Modernizr.webglextensions) {
// WebGL extensions API supported
}
if ('OES_vertex_array_object' in Modernizr.webglextensions) {
// Vertex Array Objects extension supported
}
webglextensions
Detect for the RTCDataChannel API that allows for transfer data directly from one peer to another
datachannel
Detects support for the new Promise-based getUserMedia API.
getusermedia
peerconnection
Detects support for WindowBase64 API (window.atob && window.btoa).
atobbtoa
Tests if page is iframed.
framed
Detects support for matchMedia.
matchmedia
Detects support for creating Web Workers from Blob URIs.
blobworkers
Detects support for creating Web Workers from Data URIs.
dataworkers
Detects support for the SharedWorker API from the Web Workers spec.
sharedworkers
Detects whether web workers can use transferables objects.
transferables
Detects support for the basic Worker API from the Web Workers spec. Web Workers provide a simple means for web content to run scripts in background threads.
webworkers