title: jQuery $(window).blur vs native window.onblur
body: <p>What are the advantages of using jQuery's </p>
  
  <pre><code>$(window).blur(function() { ... })
  </code></pre>
  
  <p>to attach an event handler versus setting it directly with </p>
  
  <pre><code>window.onblur = function() { ... }
  </code></pre>
  
  <p>It seems that the latter is less robust because it only supports one blur handler, and when used with other packages, other code might override the <code>window.blur</code> value with another function. However, couldn't this also happen with the jQuery implementation too, which presumably uses <code>window.blur</code> as its underlying implementation?</p>
  
  <p><strong>EDIT:</strong> Several people have also mentioned the <code>window.addEventListener</code> alternative, which can be used to add an <code>'onblur'</code> event apart from the methods above.</p>