title: How to change to Fullscreen the entire webpage with confirm()?
body: <p>I want that when click in "OK" in the confirm box the entire webpage go to fullscreen, but with this only get error <code>TypeError: docelem.requestFullscreen is not a function</code>. I tried of all but nothing...</p>
  
  <pre class="lang-js prettyprint-override"><code>var conf = confirm("Fullscreen mode?");
  var docelem = document.documentElement;
  if (conf == true) {
      docelem.requestFullscreen();
  }
  else if (conf == true) {
      docelem.mozRequestFullScreen();
  }
  else if (conf == true) {
      docelem.webkitRequestFullScreen();
  }
  else if (conf == true) {
      docelem.msRequestFullscreen();
  }
  </code></pre>
  
  <p>Some solution? or is it not possible with confirm()? Because with a button works:</p>
  
  <pre class="lang-js prettyprint-override"><code>(function () {
      var fullscreenon = document.getElementById("fullscreenbutton");//button Id
      if (fullscreenon) {
          fullscreenon.addEventListener("click", function () {
              var docelem = document.documentElement;
              if (docelem.requestFullscreen) {
                  docelem.requestFullscreen();
              }
              else if (docelem.msRequestFullscreen) {
                  docelem.msRequestFullscreen();
              }
              else if (docelem.mozRequestFullScreen) {
                  docelem.mozRequestFullScreen();
              }
              else if (docelem.webkitRequestFullScreen) {
                  docelem.webkitRequestFullScreen();
              }
          }, false);
      }
  })();
  </code></pre>