title: Beforeunload event does not fire after page refresh Chrome
body: <p>I have this simple code</p>
  
  <p><div class="snippet" data-lang="js" data-hide="false" data-console="true" data-babel="false">
  <div class="snippet-code">
  <pre class="snippet-code-html lang-html prettyprint-override"><code>&lt;!DOCTYPE html&gt;
  &lt;html xmlns="http://www.w3.org/1999/xhtml"&gt;
  &lt;head&gt;
      &lt;title&gt;&lt;/title&gt;
      &lt;!--&lt;script src="angular.min.js"&gt;&lt;/script&gt;--&gt;
      &lt;script&gt;       
  
          window.onload = function () {
              window.addEventListener("unload", function () {
                  debugger;
              });
              window.addEventListener("beforeunload", function () {
                  debugger;
              });
              window.onbeforeunload = function () {
                 
              }
          }
      &lt;/script&gt;
      
  &lt;/head&gt;
  &lt;body ng-app="app"&gt;   
  
  &lt;/body&gt;
  &lt;/html&gt;</code></pre>
  </div>
  </div>
  </p>
  
  <p>I want unload or beforeunload events be fired after I refresh the page. This is not happening in Chrome Versión 67.0.3396.62. I have tried firefox and edge and it works well. It also works when i close the tab. The error ocurrs only when i refresh the page.</p>