-
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.
- Loading branch information
Showing
13 changed files
with
130 additions
and
65 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
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,5 +1,21 @@ | ||
/*! | ||
{ | ||
"name": "ES5 Strict Mode", | ||
"property": "strictmode", | ||
"caniuse": "sctrict-mode", | ||
"notes": [{ | ||
"name": "ECMAScript 5.1 Language Specification", | ||
"href": "http://www.ecma-international.org/ecma-262/5.1/" | ||
}], | ||
"authors": ["@kangax"], | ||
"tags": ["es5"] | ||
} | ||
!*/ | ||
/* DOC | ||
Check if browser implements ECMAScript 5 Object strict mode. | ||
*/ | ||
define(['Modernizr'], function( Modernizr ) { | ||
// strict mode | ||
// test by @kangax | ||
Modernizr.addTest('strictmode', (function(){ "use strict"; return !this; })()); | ||
}); |
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,16 @@ | ||
define(['Modernizr'], function( Modernizr ) { | ||
// ES6: String.prototype.contains | ||
// By Robert Kowalski | ||
/*! | ||
{ | ||
"name": "ES5 String.prototype.contains", | ||
"property": "contains", | ||
"authors": ["Robert Kowalski"], | ||
"tags": ["es6"] | ||
} | ||
!*/ | ||
/* DOC | ||
Check if browser implements ECMAScript 6 `String.prototype.contains` per specification. | ||
*/ | ||
define(['Modernizr', 'is'], function( Modernizr, is ) { | ||
Modernizr.addTest('contains', is(String.prototype.contains, 'function')); | ||
}); | ||
}); |
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,32 @@ | ||
define(['Modernizr'], function( Modernizr ) { | ||
//By Shi Chuan | ||
//Part of Device Access aspect of HTML5, same category as geolocation | ||
//W3C Editor's Draft at http://dev.w3.org/geo/api/spec-source-orientation.html | ||
//Implementation by iOS Safari at http://goo.gl/fhce3 and http://goo.gl/rLKz8 | ||
/*! | ||
{ | ||
"name": "Device Orientation and Motion Events", | ||
"property": ["devicemotion", "deviceorientation"], | ||
"caniuse": "deviceorientation", | ||
"notes": [{ | ||
"name": "W3C Editor's Draft", | ||
"href": "http://dev.w3.org/geo/api/spec-source-orientation.html" | ||
},{ | ||
"name": "Implementation by iOS Safari (Orientation)", | ||
"href": "http://goo.gl/fhce3" | ||
},{ | ||
"name": "Implementation by iOS Safari (Motion)", | ||
"href": "http://goo.gl/rLKz8" | ||
}], | ||
"authors": ["Shi Chuan"], | ||
"tags": ["event"] | ||
} | ||
!*/ | ||
/* DOC | ||
//test for Device Motion Event support, returns boolean value true/false | ||
Modernizr.addTest('devicemotion', 'DeviceMotionEvent' in window); | ||
Part of Device Access aspect of HTML5, same category as geolocation. | ||
`devicemotion` tests for Device Motion Event support, returns boolean value true/false. | ||
//test for Device Orientation Event support, returns boolean value true/false | ||
`deviceorientation` tests for Device Orientation Event support, returns boolean value true/false | ||
*/ | ||
define(['Modernizr'], function( Modernizr ) { | ||
Modernizr.addTest('devicemotion', 'DeviceMotionEvent' in window); | ||
Modernizr.addTest('deviceorientation', 'DeviceOrientationEvent' in window); | ||
}); |
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,25 @@ | ||
/*! | ||
{ | ||
"name": "File API", | ||
"property": "filereader", | ||
"caniuse": "fileapi", | ||
"notes": [{ | ||
"name": "W3C Working Draft", | ||
"href": "http://www.w3.org/TR/FileAPI/" | ||
}], | ||
"tags": ["file"], | ||
"knownBugs": ["Will fail in Safari 5 due to its lack of support for the standards defined FileReader object"] | ||
} | ||
!*/ | ||
/* DOC | ||
`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.) | ||
*/ | ||
define(['Modernizr'], function( Modernizr ) { | ||
/** | ||
* file 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. | ||
* | ||
* Will fail in Safari 5 due to its lack of support for the standards | ||
* defined FileReader object | ||
*/ | ||
Modernizr.addTest('filereader', !!(window.File && window.FileList && window.FileReader)); | ||
}); |
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,11 +1,17 @@ | ||
/*! | ||
{ | ||
"name": "Filesystem API", | ||
"property": "filesystem", | ||
"caniuse": "filesystem", | ||
"notes": [{ | ||
"name": "W3 Draft", | ||
"href": "dev.w3.org/2009/dap/file-system/file-dir-sys.html" | ||
}], | ||
"authors": ["Eric Bidelman (@ebidel)"], | ||
"tags": ["file"], | ||
"knownBugs": ["The API will be present in Chrome incognito, but will throw an exception. See crbug.com/93417"] | ||
} | ||
!*/ | ||
define(['Modernizr', 'prefixed'], function( Modernizr, prefixed ) { | ||
// Filesystem API | ||
// dev.w3.org/2009/dap/file-system/file-dir-sys.html | ||
|
||
// The API will be present in Chrome incognito, but will throw an exception. | ||
// See crbug.com/93417 | ||
// | ||
// By Eric Bidelman (@ebidel) | ||
|
||
Modernizr.addTest('filesystem', !!prefixed('requestFileSystem', window)); | ||
}); |
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