Reapply Ember 2.10 for good this time!

This reverts commit ddd299f4aaf25353cc2f47829d213623a3cf7590.
This commit is contained in:
Robin Ward
2016-12-19 11:19:10 -05:00
parent 5058911a7b
commit e03d5e2140
101 changed files with 1867 additions and 1274 deletions

View File

@ -5,13 +5,16 @@ const _loading = {};
function loadWithTag(path, cb) {
const head = document.getElementsByTagName('head')[0];
let finished = false;
let s = document.createElement('script');
s.src = path;
if (Ember.Test) { Ember.Test.pendingAjaxRequests++; }
if (Ember.Test) {
Ember.Test.registerWaiter(() => finished);
}
head.appendChild(s);
s.onload = s.onreadystatechange = function(_, abort) {
if (Ember.Test) { Ember.Test.pendingAjaxRequests--; }
finished = true;
if (abort || !s.readyState || s.readyState === "loaded" || s.readyState === "complete") {
s = s.onload = s.onreadystatechange = null;
if (!abort) {