Skip to content

Commit

Permalink
fix MSTransitionEnd in the source. fixes Modernizr#540
Browse files Browse the repository at this point in the history
  • Loading branch information
paulirish committed Mar 29, 2012
1 parent b0c7dfc commit 1dd860d
Showing 1 changed file with 9 additions and 9 deletions.
18 changes: 9 additions & 9 deletions modernizr.js
Original file line number Original file line Diff line number Diff line change
Expand Up @@ -99,7 +99,7 @@ window.Modernizr = (function( window, document, undefined ) {
var style, ret, node, var style, ret, node,
div = document.createElement('div'), div = document.createElement('div'),
// After page load injecting a fake body doesn't work so check if body exists // After page load injecting a fake body doesn't work so check if body exists
body = document.body, body = document.body,
// IE6 and 7 won't return offsetWidth or offsetHeight unless it's in the body element, so we fake it. // IE6 and 7 won't return offsetWidth or offsetHeight unless it's in the body element, so we fake it.
fakeBody = body ? body : document.createElement('body'); fakeBody = body ? body : document.createElement('body');


Expand Down Expand Up @@ -496,7 +496,7 @@ window.Modernizr = (function( window, document, undefined ) {
}; };




// Chrome incognito mode used to throw an exception when using openDatabase // Chrome incognito mode used to throw an exception when using openDatabase
// It doesn't anymore. // It doesn't anymore.
tests['websqldatabase'] = function() { tests['websqldatabase'] = function() {
return !!window.openDatabase; return !!window.openDatabase;
Expand Down Expand Up @@ -625,7 +625,7 @@ window.Modernizr = (function( window, document, undefined ) {
}; };




// Note, Android < 4 will pass this test, but can only animate // Note, Android < 4 will pass this test, but can only animate
// a single property at a time // a single property at a time
// daneden.me/2011/12/putting-up-with-androids-bullshit/ // daneden.me/2011/12/putting-up-with-androids-bullshit/
tests['cssanimations'] = function() { tests['cssanimations'] = function() {
Expand Down Expand Up @@ -653,8 +653,8 @@ window.Modernizr = (function( window, document, undefined ) {


setCss( setCss(
// legacy webkit syntax (FIXME: remove when syntax not in use anymore) // legacy webkit syntax (FIXME: remove when syntax not in use anymore)
(str1 + '-webkit- '.split(' ').join(str2 + str1) (str1 + '-webkit- '.split(' ').join(str2 + str1)
// standard syntax // trailing 'background-image:' // standard syntax // trailing 'background-image:'
+ prefixes.join(str3 + str1)).slice(0, -str1.length) + prefixes.join(str3 + str1)).slice(0, -str1.length)
); );


Expand Down Expand Up @@ -750,7 +750,7 @@ window.Modernizr = (function( window, document, undefined ) {
var elem = document.createElement('audio'), var elem = document.createElement('audio'),
bool = false; bool = false;


try { try {
if ( bool = !!elem.canPlayType ) { if ( bool = !!elem.canPlayType ) {
bool = new Boolean(bool); bool = new Boolean(bool);
bool.ogg = elem.canPlayType('audio/ogg; codecs="vorbis"').replace(/^no$/,''); bool.ogg = elem.canPlayType('audio/ogg; codecs="vorbis"').replace(/^no$/,'');
Expand All @@ -760,7 +760,7 @@ window.Modernizr = (function( window, document, undefined ) {
// developer.mozilla.org/En/Media_formats_supported_by_the_audio_and_video_elements // developer.mozilla.org/En/Media_formats_supported_by_the_audio_and_video_elements
// bit.ly/iphoneoscodecs // bit.ly/iphoneoscodecs
bool.wav = elem.canPlayType('audio/wav; codecs="1"') .replace(/^no$/,''); bool.wav = elem.canPlayType('audio/wav; codecs="1"') .replace(/^no$/,'');
bool.m4a = ( elem.canPlayType('audio/x-m4a;') || bool.m4a = ( elem.canPlayType('audio/x-m4a;') ||
elem.canPlayType('audio/aac;')) .replace(/^no$/,''); elem.canPlayType('audio/aac;')) .replace(/^no$/,'');
} }
} catch(e) { } } catch(e) { }
Expand Down Expand Up @@ -1225,7 +1225,7 @@ window.Modernizr = (function( window, document, undefined ) {
// A few important notes: // A few important notes:
// * If a browser does not support media queries at all (eg. oldIE) the mq() will always return false // * If a browser does not support media queries at all (eg. oldIE) the mq() will always return false
// * A max-width or orientation query will be evaluated against the current state, which may change later. // * A max-width or orientation query will be evaluated against the current state, which may change later.
// * You must specify values. Eg. If you are testing support for the min-width media query use: // * You must specify values. Eg. If you are testing support for the min-width media query use:
// Modernizr.mq('(min-width:0)') // Modernizr.mq('(min-width:0)')
// usage: // usage:
// Modernizr.mq('only screen and (max-width:768)') // Modernizr.mq('only screen and (max-width:768)')
Expand Down Expand Up @@ -1278,7 +1278,7 @@ window.Modernizr = (function( window, document, undefined ) {
// 'WebkitTransition' : 'webkitTransitionEnd', // 'WebkitTransition' : 'webkitTransitionEnd',
// 'MozTransition' : 'transitionend', // 'MozTransition' : 'transitionend',
// 'OTransition' : 'oTransitionEnd', // 'OTransition' : 'oTransitionEnd',
// 'msTransition' : 'MsTransitionEnd', // 'msTransition' : 'MSTransitionEnd',
// 'transition' : 'transitionend' // 'transition' : 'transitionend'
// }, // },
// transEndEventName = transEndEventNames[ Modernizr.prefixed('transition') ]; // transEndEventName = transEndEventNames[ Modernizr.prefixed('transition') ];
Expand Down

0 comments on commit 1dd860d

Please sign in to comment.