Javascript 是否有任何原因导致window.matchMedia(';screen';)在web浏览器中返回false?

Javascript 是否有任何原因导致window.matchMedia(';screen';)在web浏览器中返回false?,javascript,firefox,cross-browser,screen,matchmedia,Javascript,Firefox,Cross Browser,Screen,Matchmedia,我正在运行以下代码: var hasMatchMediaSupport = (typeof window.matchMedia !== 'undefined') ? !!window.matchMedia('screen').matches : false; 这张支票会返回false有什么原因吗?这只发生在Firefox浏览器中,跨越各种操作系统。一个相关的细节是,该代码在一个广告单元内执行,有时在HTML5广告单元内执行 这在Windows7、Windows8、Windows10、MacOS

我正在运行以下代码:

var hasMatchMediaSupport = (typeof window.matchMedia !== 'undefined') ? !!window.matchMedia('screen').matches : false;
这张支票会返回false有什么原因吗?这只发生在Firefox浏览器中,跨越各种操作系统。一个相关的细节是,该代码在一个广告单元内执行,有时在HTML5广告单元内执行

这在Windows7、Windows8、Windows10、MacOSX10.8和其他一些操作系统中都会发生,Firefox的版本从36到41不等

编辑:
在此处找到此错误报告,并能够在Mac OS X 10.10-上的Firefox 41中进行复制。

此错误已修复,现在返回非空值。例如:


.hidden{显示:无;}

你能给出一个这样的操作系统吗?在我的Firefox浏览器中效果很好这只发生在广告单元内。