Skip to content

Commit

Permalink
Changing docElement.innerWidth -> window.innerWidth in `cssvwunit…
Browse files Browse the repository at this point in the history
…` detect (because the former isn’t a thing)
  • Loading branch information
stucox authored and patrickkettner committed Mar 13, 2014
1 parent 0f422b9 commit b03c40b
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions feature-detects/css/vwunit.js
Original file line number Diff line number Diff line change
Expand Up @@ -13,12 +13,12 @@
}]
}
!*/
define(['Modernizr', 'docElement', 'testStyles'], function( Modernizr, docElement, testStyles ) {
define(['Modernizr', 'testStyles'], function( Modernizr, testStyles ) {
testStyles('#modernizr { width: 50vw; }', function( elem ) {
var width = parseInt(docElement.innerWidth/2,10);
var width = parseInt(window.innerWidth / 2, 10);
var compStyle = parseInt((window.getComputedStyle ?
getComputedStyle(elem, null) :
elem.currentStyle)['width'],10);
elem.currentStyle).width, 10);

Modernizr.addTest('cssvwunit', compStyle == width);
});
Expand Down

0 comments on commit b03c40b

Please sign in to comment.