By default, if I were to write some JS and use a number in an argument, the value would be interpreted as pixels. For example, "844" in the if-statement below would be "844 pixels".
window.onresize = (function(){
var w = window.innerWidth,
nav = document.querySelector('.nav');
if (w >= 844 && nav.classList.contains('menu_open')) {
nav.classList.remove('menu_open');
}
});
Is it possible to specify ems or other non-pixel units in this scenario?