diff --git a/feature-detects/css/vwunit.js b/feature-detects/css/vwunit.js index fb12423e43..0e097b0e94 100644 --- a/feature-detects/css/vwunit.js +++ b/feature-detects/css/vwunit.js @@ -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); });