title: how to detect a browser supports requestFullscreen
body: <p>How can I detect a browser supports <code>requestFullscreen</code> or not?</p>
  
  <p>I have these codes below to make chrome, safari, firefox, and opera (not entirely working) to make a document fullscreen, but I want to detect the browser supports <code>requestFullscreen</code> or not. What should I do?</p>
  
  <pre><code> $('.button-fullscreen').click(function(){ 
  
      var docElm = document.documentElement;
  
      // W3C Proposal
      if (docElm.requestFullscreen) {
          docElm.requestFullscreen();
      }
  
      // mozilla proposal
      else if (docElm.mozRequestFullScreen) {
          docElm.mozRequestFullScreen();          
      }
  
      // Webkit (works in Safari and Chrome Canary)
      else if (docElm.webkitRequestFullScreen) {
          docElm.webkitRequestFullScreen(); 
      }
  
      return false;
  });
  
  $('.button-sound').click(function(){               
  
      // W3C Proposal
      if (document.exitFullscreen) {
          document.exitFullscreen();
      }
  
      // mozilla proposal
      else if (document.mozCancelFullScreen) {
          document.mozCancelFullScreen();
      }
  
      // Webkit (works in Safari and Chrome Canary)
      else if (document.webkitCancelFullScreen) {
          document.webkitCancelFullScreen();
      }
  
      return false;
  });
  </code></pre>