-
Notifications
You must be signed in to change notification settings - Fork 3k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
All tests now have metadata – whoop!
- Loading branch information
Showing
30 changed files
with
800 additions
and
87 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,23 @@ | ||
/*! | ||
{ | ||
"name": "Application Cache", | ||
"property": "applicationcache", | ||
"caniuse": "offline-apps", | ||
"tags": ["storage", "offline"], | ||
"notes": [{ | ||
"name": "MDN documentation", | ||
"href": "https://developer.mozilla.org/en/docs/HTML/Using_the_application_cache" | ||
}], | ||
"polyfills": ["html5gears"] | ||
} | ||
!*/ | ||
/* DOC | ||
Detects support for the Application Cache, for storing data to enable web-based applications run offline. | ||
The API has been [heavily criticized](http://alistapart.com/article/application-cache-is-a-douchebag) and discussions are underway to address this. | ||
*/ | ||
define(['Modernizr'], function( Modernizr ) { | ||
Modernizr.addTest('applicationcache', !!window.applicationCache); | ||
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,21 @@ | ||
/*! | ||
{ | ||
"name": "Battery API", | ||
"property": "batteryapi", | ||
"aliases": ["battery-api"], | ||
"tags": ["device", "media"], | ||
"authors": ["Paul Sayre"], | ||
"notes": [{ | ||
"name": "MDN documentation", | ||
"href": "https://developer.mozilla.org/en/DOM/window.navigator.mozBattery" | ||
}] | ||
} | ||
!*/ | ||
/* DOC | ||
Detect support for the Battery API, for accessing information about the system's battery charge level. | ||
*/ | ||
define(['Modernizr', 'prefixed'], function( Modernizr, prefixed ) { | ||
// Battery API | ||
// https://developer.mozilla.org/en/DOM/window.navigator.mozBattery | ||
// By: Paul Sayre | ||
Modernizr.addTest('batteryapi', !!prefixed('battery', navigator), { aliases: ['battery-api'] }); | ||
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,9 +1,20 @@ | ||
define(['Modernizr', 'docElement'], function( Modernizr, docElement ) { | ||
// contentEditable | ||
// http://www.whatwg.org/specs/web-apps/current-work/multipage/editing.html#contenteditable | ||
/*! | ||
{ | ||
"name": "Content Editable", | ||
"property": "contenteditable", | ||
"caniuse": "contenteditable", | ||
"knownBugs": ["This is known to false positive in some mobile browsers. Here is a whitelist of verified working browsers: http://bit.ly/15RIQ9A"], | ||
"notes": [{ | ||
"name": "WHATWG spec", | ||
"href": "http://www.whatwg.org/specs/web-apps/current-work/multipage/editing.html#contenteditable" | ||
}] | ||
} | ||
!*/ | ||
/* DOC | ||
Detects support for the `contenteditable` attribute of elements, allowing their DOM text contents to be edited directly by the user. | ||
// this is known to false positive in some mobile browsers | ||
// here is a whitelist of verified working browsers: | ||
// https://github.com/NielsLeenheer/html5test/blob/549f6eac866aa861d9649a0707ff2c0157895706/scripts/engine.js#L2083 | ||
*/ | ||
define(['Modernizr', 'docElement'], function( Modernizr, docElement ) { | ||
Modernizr.addTest('contenteditable', 'contentEditable' in docElement); | ||
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,12 +1,23 @@ | ||
define(['Modernizr'], function( Modernizr ) { | ||
// Test for (experimental) Content Security Policy 1.1 support. | ||
// | ||
// This feature is still quite experimental, but is available now in Chrome 22. | ||
// If the `SecurityPolicy` property is available, you can be sure the browser | ||
// supports CSP. If it's not available, the browser still might support an | ||
// earlier version of the CSP spec. | ||
// | ||
// Editor's Draft: https://dvcs.w3.org/hg/content-security-policy/raw-file/tip/csp-specification.dev.html | ||
/*! | ||
{ | ||
"name": "Content Security Policy", | ||
"property": "contentsecuritypolicy", | ||
"caniuse": "contentsecuritypolicy", | ||
"tags": ["security"], | ||
"notes": [{ | ||
"name": "W3C spec", | ||
"href": "http://www.w3.org/TR/CSP/" | ||
},{ | ||
"name": "MDN documentation", | ||
"href": "https://developer.mozilla.org/en-US/docs/Security/CSP" | ||
}] | ||
} | ||
!*/ | ||
/* DOC | ||
Detects support for the Content Security Policy protocol for mitigating and reporting security attacks. | ||
*/ | ||
define(['Modernizr'], function( Modernizr ) { | ||
Modernizr.addTest('contentsecuritypolicy', 'SecurityPolicy' in document); | ||
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,21 @@ | ||
/*! | ||
{ | ||
"name": "Cross-Origin Resource Sharing", | ||
"property": "cors", | ||
"caniuse": "cors", | ||
"authors": ["Theodoor van Donge"], | ||
"notes": [{ | ||
"name": "MDN documentation", | ||
"href": "https://developer.mozilla.org/en-US/docs/HTTP/Access_control_CORS" | ||
}], | ||
"polyfills": ["pmxdr", "ppx", "flxhr"] | ||
} | ||
!*/ | ||
/* DOC | ||
Detects support for Cross-Origin Resource Sharing: method of performing XMLHttpRequests across domains. | ||
*/ | ||
define(['Modernizr'], function( Modernizr ) { | ||
// cors | ||
// By Theodoor van Donge | ||
Modernizr.addTest('cors', !!(window.XMLHttpRequest && 'withCredentials' in new XMLHttpRequest())); | ||
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,8 +1,24 @@ | ||
/*! | ||
{ | ||
"name": "Custom protocol handler", | ||
"property": "customprotocolhandler", | ||
"authors": ["Ben Schwarz"], | ||
"notes": [{ | ||
"name": "WHATWG overview", | ||
"href": "http://developers.whatwg.org/timers.html#custom-handlers" | ||
},{ | ||
"name": "MDN documentation", | ||
"href": "https://developer.mozilla.org/en-US/docs/Web/API/navigator.registerProtocolHandler" | ||
}], | ||
"warnings": [], | ||
"polyfills": [] | ||
} | ||
!*/ | ||
/* DOC | ||
Detects support for the `window.registerProtocolHandler()` API to allow web sites to register themselves as possible handlers for particular protocols. | ||
*/ | ||
define(['Modernizr'], function( Modernizr ) { | ||
/* | ||
Custom protocol handler support | ||
http://developers.whatwg.org/timers.html#custom-handlers | ||
Added by @benschwarz | ||
*/ | ||
Modernizr.addTest('customprotocolhandler', !!navigator.registerProtocolHandler); | ||
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,7 +1,19 @@ | ||
define(['Modernizr', 'prefixed'], function( Modernizr, prefixed ) { | ||
// Dart | ||
// By Theodoor van Donge | ||
// https://chromiumcodereview.appspot.com/9232049/ | ||
/*! | ||
{ | ||
"name": "Dart", | ||
"property": "dart", | ||
"authors": ["Theodoor van Donge"], | ||
"notes": [{ | ||
"name": "Language website", | ||
"href": "http://www.dartlang.org/" | ||
}] | ||
} | ||
!*/ | ||
/* DOC | ||
Detects native support for the Dart programming language. | ||
*/ | ||
define(['Modernizr', 'prefixed'], function( Modernizr, prefixed ) { | ||
Modernizr.addTest('dart', !!prefixed('startDart', navigator)); | ||
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,20 @@ | ||
/*! | ||
{ | ||
"name": "DataView", | ||
"property": "dataview", | ||
"authors": ["Addy Osmani"], | ||
"notes": [{ | ||
"name": "MDN documentation", | ||
"href": "https://developer.mozilla.org/en/JavaScript_typed_arrays/DataView" | ||
}], | ||
"polyfills": ["jdataview"] | ||
} | ||
!*/ | ||
/* DOC | ||
Detects support for the DataView interface for reading data from an ArrayBuffer as part of the Typed Array spec. | ||
*/ | ||
define(['Modernizr'], function( Modernizr ) { | ||
// DataView | ||
// https://developer.mozilla.org/en/JavaScript_typed_arrays/DataView | ||
// By Addy Osmani | ||
Modernizr.addTest('dataview', (typeof DataView !== 'undefined' && 'getFloat64' in DataView.prototype)); | ||
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.