Modernizr is a JavaScript library that detects HTML5 and CSS3 features in the user’s browser.
MIT License
[here](/README.id.md)
[here](/README.sp.md)
[here](/README.sv.md)
[here](/README.ta.md)
[here](/README.ka.md)
[here](/README.hi.md)
, (https://modernizr.com)
CSS3 HTML5 : `` , `<html>`
<= 10 , 12
:
`class` `es6 class`
:
cookies
, indexeddb
, indexedblob
, quota-management-api
, userdata
storage subdirectoryaudio
battery
moved into the battery subdirectorycanvas
, canvastext
customevent
, eventlistener
, forcetouch
, hashchange
, pointerevents
, proximity
Event subdirectoryexiforientation
capture
, fileinput
, fileinputdirectory
, formatattribute
, input
, inputnumber-l10n
, inputsearchevent
, inputtypes
, placeholder
, requestautocomplete
, validation
svg
svgwebgl
webgl:
touchevents
: discussion
unicode
: discussion
templatestrings
: es6 stringtemplate
contains
: es6 es6string
datalistelem
: Modernizr.input.list, <html>
****
API :
// Listen to a test, give it a callback
Modernizr.on("testname", function (result) {
if (result) {
console.log("The test passed!");
} else {
console.log("The test failed!");
}
});
( `` )
`` , ,
src/addTest
, `on`
npm install
Modernizr can be used programmatically via npm:
var modernizr = require("modernizr");
A build
method is exposed for generating custom Modernizr builds. Example:
var modernizr = require("modernizr");
modernizr.build({}, function (result) {
console.log(result); // the build
});
- JSON [`lib/config-all.json`](lib/config-all.json)
modernizr :
./bin/modernizr
'config-all.json' npm :
npm start
//outputs to ./dist/modernizr-build.js
-- :
npm test
:
npm run serve-gh-pages
:
http://localhost:8080/test/unit.html
http://localhost:8080/test/integration.html