title: onbeforeunload event on iframe is not triggered in google chrome, works in IE, firefox
body: <p>If you set an unbeforeunload event inside an iframe, this is not triggered when you for instance click through to a link in the iframe. It works in IE and Firefox (not Opera, but Opera does not support onbeforeunload in general AFAIK). </p>
  
  <p>Just wondering, am I doing something wrong? Should this behaviour not be possible? Or is it a bug in Google Chrome/webkit? Any workarounds?</p>
  
  <p>Code example:</p>
  
  <p>test.html:</p>
  
  <pre><code>&lt;html&gt;
    &lt;body&gt;
      &lt;p&gt;Main page content&lt;/p&gt;
      &lt;script type="text/javascript"&gt;
        window.onbeforeunload = function() {alert('unloadevent in main window');};
      &lt;/script&gt;
      &lt;iframe id="tpa" src="..test2.html"&gt;&lt;/iframe&gt;
    &lt;/body&gt;
  &lt;/html&gt;
  </code></pre>
  
  <p>test2.html:</p>
  
  <pre><code>&lt;html&gt;
    &lt;body&gt;
      &lt;script type="text/javascript"&gt;
        self.onbeforeunload = function() {alert('unloadevent in frame window');};
      &lt;/script&gt;
      &lt;a href="http://www.google.com/"&gt;Link to for instance google&lt;/a&gt;
    &lt;/body&gt;
  &lt;/html&gt;
  </code></pre>