title: Something overwrites window.onbeforeunload in Javascript
body: <p>
  Hello guys,</p>
  
  <p>I have a strange problem with my ASP.NET 4.5 page. For some strange reason, my window.onbeforeunload function gets overwritten every time I load the page. Inside the debugger, I can clearly see that the right value is set in my head section, if I place a breakpoint there. However, after finishing the loading process of the site, the value changes to the following:</p>
  
  <pre class="lang-js prettyprint-override"><code>function (a){return typeof p!="undefined"&amp;&amp;(!a||p.event.triggered!==a.type)?p.event.dispatch.apply(h.elem,arguments):b}
  </code></pre>
  
  <p>I have no idea where this is coming from. This is my code from the head section of the page:</p>
  
  <pre class="lang-js prettyprint-override"><code>window.onbeforeunload = function (e) { return 'Do you really want to cancel?'; };
  </code></pre>
  
  <p>I'm using JQuery 2.1.3 as well as DevExpress 14.2 in my project. Any idea what could be responsible for this weird behavior?</p>
  
  <p>Thanks in advance!</p>