~canonical-sysadmins/wordpress/4.7.2

« back to all changes in this revision

Viewing changes to wp-includes/js/zxcvbn-async.js

  • Committer: Jacek Nykis
  • Date: 2015-01-05 16:17:05 UTC
  • Revision ID: jacek.nykis@canonical.com-20150105161705-w544l1h5mcg7u4w9
Initial commit

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
/* global _zxcvbnSettings */
 
2
(function() {
 
3
  var async_load = function() {
 
4
    var first, s;
 
5
    s = document.createElement('script');
 
6
    s.src = _zxcvbnSettings.src;
 
7
    s.type = 'text/javascript';
 
8
    s.async = true;
 
9
    first = document.getElementsByTagName('script')[0];
 
10
    return first.parentNode.insertBefore(s, first);
 
11
  };
 
12
 
 
13
  if (window.attachEvent != null) {
 
14
    window.attachEvent('onload', async_load);
 
15
  } else {
 
16
    window.addEventListener('load', async_load, false);
 
17
  }
 
18
}).call(this);