title: Is there any reason window.matchMedia('screen') would return false in a web browser?
body: <p>I am running the following code:</p>
  
  <pre><code>var hasMatchMediaSupport = (typeof window.matchMedia !== 'undefined') ? !!window.matchMedia('screen').matches : false;
  </code></pre>
  
  <p>Is there any reason why this check would return false? This is occurring in Firefox browsers only, across a wide variety of operating systems. One relevant detail is that this code is executing inside of an ad unit, sometimes inside of HTML5 ad units.</p>
  
  <p>This happens in Windows 7, Windows 8, Windows 10, Mac OS X 10.8, and several other operating systems, with versions of Firefox ranging from 36 to 41.</p>
  
  <p>Edit:
  Found this bug report here and was able to replicate in Firefox 41 on Mac OS X 10.10 - <a href="https://bugzilla.mozilla.org/show_bug.cgi?id=1011330" rel="nofollow noreferrer">matchMedia does not run correctly inside of hidden iframes</a>.</p>