mobile responsive
This commit is contained in:
@@ -1,14 +1,14 @@
|
||||
{
|
||||
"name": "modernizr",
|
||||
"homepage": "https://github.com/Modernizr/Modernizr",
|
||||
"version": "2.8.3",
|
||||
"_release": "2.8.3",
|
||||
"version": "2.7.1",
|
||||
"_release": "2.7.1",
|
||||
"_resolution": {
|
||||
"type": "version",
|
||||
"tag": "v2.8.3",
|
||||
"commit": "d6bb30c0f12ebb3ddd01e90b0bf435e1c34e6f11"
|
||||
"tag": "v2.7.1",
|
||||
"commit": "54252c10fc7d3b8b17cf458c401ca904dc354d8c"
|
||||
},
|
||||
"_source": "git://github.com/Modernizr/Modernizr.git",
|
||||
"_target": ">= 2.7.2",
|
||||
"_target": "2.7.1",
|
||||
"_originalSource": "modernizr"
|
||||
}
|
||||
-4
@@ -1,4 +0,0 @@
|
||||
|
||||
// http://html.adobe.com/webplatform/layout/shapes
|
||||
|
||||
Modernizr.addTest('shapes', Modernizr.testAllProps('shapeOutside', 'content-box', true));
|
||||
+55
-34
@@ -7,56 +7,77 @@
|
||||
(function(document, Modernizr){
|
||||
|
||||
|
||||
Modernizr.formvalidationapi = false;
|
||||
Modernizr.formvalidationmessage = false;
|
||||
Modernizr.formvalidationapi = false;
|
||||
Modernizr.formvalidationmessage = false;
|
||||
|
||||
Modernizr.addTest('formvalidation', function() {
|
||||
Modernizr.addTest('formvalidation', function(){
|
||||
var form = document.createElement('form');
|
||||
if ( !('checkValidity' in form) || !('addEventListener' in form) ) {
|
||||
return false;
|
||||
if ( !('checkValidity' in form) ) {
|
||||
return false;
|
||||
}
|
||||
if ('reportValidity' in form) {
|
||||
return true;
|
||||
}
|
||||
var invalidFired = false;
|
||||
var input;
|
||||
var body = document.body,
|
||||
|
||||
Modernizr.formvalidationapi = true;
|
||||
html = document.documentElement,
|
||||
|
||||
bodyFaked = false,
|
||||
|
||||
invaildFired = false,
|
||||
|
||||
input;
|
||||
|
||||
Modernizr.formvalidationapi = true;
|
||||
|
||||
// Prevent form from being submitted
|
||||
form.addEventListener('submit', function(e) {
|
||||
//Opera does not validate form, if submit is prevented
|
||||
if ( !window.opera ) {
|
||||
e.preventDefault();
|
||||
}
|
||||
e.stopPropagation();
|
||||
}, false);
|
||||
form.onsubmit = function(e) {
|
||||
//Opera does not validate form, if submit is prevented
|
||||
if ( !window.opera ) {
|
||||
e.preventDefault();
|
||||
}
|
||||
e.stopPropagation();
|
||||
};
|
||||
|
||||
// Calling form.submit() doesn't trigger interactive validation,
|
||||
// Calling form.submit() doesn't trigger interactive validation,
|
||||
// use a submit button instead
|
||||
//older opera browsers need a name attribute
|
||||
form.innerHTML = '<input name="modTest" required><button></button>';
|
||||
|
||||
Modernizr.testStyles('#modernizr form{position:absolute;top:-99999em}', function( node ) {
|
||||
node.appendChild(form);
|
||||
// FF4 doesn't trigger "invalid" event if form is not in the DOM tree
|
||||
// Chrome throws error if invalid input is not visible when submitting
|
||||
form.style.position = 'absolute';
|
||||
form.style.top = '-99999em';
|
||||
|
||||
input = form.getElementsByTagName('input')[0];
|
||||
// We might in <head> in which case we need to create body manually
|
||||
if ( !body ) {
|
||||
bodyFaked = true;
|
||||
body = document.createElement('body');
|
||||
//avoid crashing IE8, if background image is used
|
||||
body.style.background = "";
|
||||
html.appendChild(body);
|
||||
}
|
||||
|
||||
// Record whether "invalid" event is fired
|
||||
input.addEventListener('invalid', function(e) {
|
||||
invalidFired = true;
|
||||
body.appendChild(form);
|
||||
|
||||
input = form.getElementsByTagName('input')[0];
|
||||
|
||||
// Record whether "invalid" event is fired
|
||||
input.oninvalid = function(e) {
|
||||
invaildFired = true;
|
||||
e.preventDefault();
|
||||
e.stopPropagation();
|
||||
}, false);
|
||||
};
|
||||
|
||||
//Opera does not fully support the validationMessage property
|
||||
Modernizr.formvalidationmessage = !!input.validationMessage;
|
||||
//Opera does not fully support the validationMessage property
|
||||
Modernizr.formvalidationmessage = !!input.validationMessage;
|
||||
|
||||
// Submit form by clicking submit button
|
||||
form.getElementsByTagName('button')[0].click();
|
||||
});
|
||||
// Submit form by clicking submit button
|
||||
form.getElementsByTagName('button')[0].click();
|
||||
|
||||
return invalidFired;
|
||||
});
|
||||
// Don't forget to clean up
|
||||
body.removeChild(form);
|
||||
bodyFaked && html.removeChild(body);
|
||||
|
||||
})(document, window.Modernizr);
|
||||
return invaildFired;
|
||||
});
|
||||
|
||||
|
||||
})(document, window.Modernizr);
|
||||
+1
-1
@@ -7,4 +7,4 @@
|
||||
// window.Notification only exist in the draft specs
|
||||
// http://dev.w3.org/2006/webapi/WebNotifications/publish/Notifications.html#idl-if-Notification
|
||||
|
||||
Modernizr.addTest('notification', 'Notification' in window && 'permission' in window.Notification && 'requestPermission' in window.Notification);
|
||||
Modernizr.addTest('notification', !!Modernizr.prefixed('Notifications', window));
|
||||
+3
-16
@@ -1,20 +1,7 @@
|
||||
|
||||
// binaryType is truthy if there is support.. returns "blob" in new-ish chrome.
|
||||
// plus.google.com/115535723976198353696/posts/ERN6zYozENV
|
||||
// github.com/Modernizr/Modernizr/issues/370
|
||||
|
||||
Modernizr.addTest('websocketsbinary', function() {
|
||||
var protocol = 'https:'==location.protocol?'wss':'ws',
|
||||
protoBin;
|
||||
|
||||
if('WebSocket' in window) {
|
||||
if( protoBin = 'binaryType' in WebSocket.prototype ) {
|
||||
return protoBin;
|
||||
}
|
||||
try {
|
||||
return !!(new WebSocket(protocol+'://.').binaryType);
|
||||
} catch (e){}
|
||||
}
|
||||
|
||||
return false;
|
||||
});
|
||||
Modernizr.addTest('websocketsbinary',
|
||||
!!(window.WebSocket && (new WebSocket('ws://.')).binaryType)
|
||||
);
|
||||
|
||||
+22
-40
@@ -7,60 +7,42 @@
|
||||
|
||||
(function(){
|
||||
try {
|
||||
|
||||
// we're avoiding using Modernizr._domPrefixes as the prefix capitalization on
|
||||
// these guys are notoriously peculiar.
|
||||
var BlobBuilder = window.MozBlobBuilder || window.WebKitBlobBuilder || window.MSBlobBuilder || window.OBlobBuilder || window.BlobBuilder;
|
||||
var URL = window.MozURL || window.webkitURL || window.MSURL || window.OURL || window.URL;
|
||||
var BlobBuilder = window.MozBlobBuilder || window.WebKitBlobBuilder || window.MSBlobBuilder || window.OBlobBuilder || window.BlobBuilder,
|
||||
URL = window.MozURL || window.webkitURL || window.MSURL || window.OURL || window.URL;
|
||||
|
||||
var data = 'Modernizr',
|
||||
blob,
|
||||
bb,
|
||||
worker,
|
||||
url,
|
||||
timeout,
|
||||
scriptText = 'this.onmessage=function(e){postMessage(e.data)}';
|
||||
bb = new BlobBuilder();
|
||||
|
||||
try {
|
||||
blob = new Blob([scriptText], {type:'text/javascript'});
|
||||
} catch(e) {
|
||||
// we'll fall back to the deprecated BlobBuilder
|
||||
}
|
||||
if (!blob) {
|
||||
bb = new BlobBuilder();
|
||||
bb.append(scriptText);
|
||||
blob = bb.getBlob();
|
||||
}
|
||||
bb.append('this.onmessage=function(e){postMessage(e.data)}');
|
||||
|
||||
url = URL.createObjectURL(blob);
|
||||
worker = new Worker(url);
|
||||
var url = URL.createObjectURL(bb.getBlob()),
|
||||
worker = new Worker(url);
|
||||
|
||||
bb = null;
|
||||
|
||||
worker.onmessage = function(e) {
|
||||
worker.terminate();
|
||||
URL.revokeObjectURL(url);
|
||||
Modernizr.addTest('blobworkers', data === e.data);
|
||||
cleanup();
|
||||
worker = null;
|
||||
};
|
||||
|
||||
// Just in case...
|
||||
worker.onerror = fail;
|
||||
timeout = setTimeout(fail, 200);
|
||||
worker.onerror = function() {
|
||||
Modernizr.addTest('blobworkers', false);
|
||||
worker = null;
|
||||
};
|
||||
|
||||
setTimeout(function() {
|
||||
Modernizr.addTest('blobworkers', false);
|
||||
}, 200);
|
||||
|
||||
worker.postMessage(data);
|
||||
|
||||
} catch (e) {
|
||||
fail();
|
||||
}
|
||||
|
||||
function fail() {
|
||||
Modernizr.addTest('blobworkers', false);
|
||||
cleanup();
|
||||
}
|
||||
|
||||
function cleanup() {
|
||||
if (url) {
|
||||
URL.revokeObjectURL(url);
|
||||
}
|
||||
if (worker) {
|
||||
worker.terminate();
|
||||
}
|
||||
if (timeout) {
|
||||
clearTimeout(timeout);
|
||||
}
|
||||
}
|
||||
}());
|
||||
|
||||
@@ -4,7 +4,7 @@ module.exports = function( grunt ) {
|
||||
|
||||
grunt.initConfig({
|
||||
meta: {
|
||||
version: '2.8.3',
|
||||
version: '2.7.1',
|
||||
banner: '/*!\n' +
|
||||
' * Modernizr v<%= meta.version %>\n' +
|
||||
' * www.modernizr.com\n *\n' +
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
/*!
|
||||
* Modernizr v2.8.3
|
||||
* Modernizr v2.7.1
|
||||
* www.modernizr.com
|
||||
*
|
||||
* Copyright (c) Faruk Ates, Paul Irish, Alex Sexton
|
||||
@@ -24,7 +24,7 @@
|
||||
|
||||
window.Modernizr = (function( window, document, undefined ) {
|
||||
|
||||
var version = '2.8.3',
|
||||
var version = '2.7.1',
|
||||
|
||||
Modernizr = {},
|
||||
|
||||
@@ -156,7 +156,7 @@ window.Modernizr = (function( window, document, undefined ) {
|
||||
|
||||
var matchMedia = window.matchMedia || window.msMatchMedia;
|
||||
if ( matchMedia ) {
|
||||
return matchMedia(mq) && matchMedia(mq).matches || false;
|
||||
return matchMedia(mq).matches;
|
||||
}
|
||||
|
||||
var bool;
|
||||
@@ -605,7 +605,7 @@ window.Modernizr = (function( window, document, undefined ) {
|
||||
|
||||
// Note, Android < 4 will pass this test, but can only animate
|
||||
// a single property at a time
|
||||
// goo.gl/v3V4Gp
|
||||
// daneden.me/2011/12/putting-up-with-androids-bullshit/
|
||||
tests['cssanimations'] = function() {
|
||||
return testPropsAll('animationName');
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user