ember-source 4.4.0-alpha.7 → 4.5.0-alpha.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +8 -0
- package/build-metadata.json +3 -3
- package/dist/ember-template-compiler.js +2 -2
- package/dist/ember-template-compiler.map +1 -1
- package/dist/ember-testing.js +1 -1
- package/dist/ember-testing.map +1 -1
- package/dist/ember.debug.js +737 -867
- package/dist/ember.debug.map +1 -1
- package/dist/header/license.js +1 -1
- package/dist/packages/@ember/-internals/container/index.js +3 -10
- package/dist/packages/@ember/-internals/glimmer/index.js +19 -7
- package/dist/packages/@ember/-internals/owner/index.js +3 -0
- package/dist/packages/@ember/-internals/routing/lib/system/router.js +3 -0
- package/dist/packages/@ember/-internals/runtime/lib/system/namespace.js +15 -9
- package/dist/packages/@ember/-internals/views/lib/views/core_view.js +4 -6
- package/dist/packages/@ember/application/instance.js +93 -171
- package/dist/packages/@ember/application/lib/application.js +201 -304
- package/dist/packages/@ember/application/lib/lazy_load.js +8 -7
- package/dist/packages/@ember/engine/index.js +313 -275
- package/dist/packages/@ember/engine/instance.js +74 -72
- package/dist/packages/ember/version.js +1 -1
- package/docs/data.json +350 -406
- package/package.json +2 -2
|
@@ -32,9 +32,11 @@ export let _loaded = loaded;
|
|
|
32
32
|
*/
|
|
33
33
|
|
|
34
34
|
export function onLoad(name, callback) {
|
|
35
|
+
var _a;
|
|
36
|
+
|
|
35
37
|
let object = loaded[name];
|
|
36
|
-
loadHooks[name]
|
|
37
|
-
|
|
38
|
+
let hooks = (_a = loadHooks[name]) !== null && _a !== void 0 ? _a : loadHooks[name] = [];
|
|
39
|
+
hooks.push(callback);
|
|
38
40
|
|
|
39
41
|
if (object) {
|
|
40
42
|
callback(object);
|
|
@@ -53,17 +55,16 @@ export function onLoad(name, callback) {
|
|
|
53
55
|
*/
|
|
54
56
|
|
|
55
57
|
export function runLoadHooks(name, object) {
|
|
58
|
+
var _a;
|
|
59
|
+
|
|
56
60
|
loaded[name] = object;
|
|
57
61
|
|
|
58
62
|
if (window && typeof CustomEvent === 'function') {
|
|
59
63
|
let event = new CustomEvent(name, {
|
|
60
|
-
detail: object
|
|
61
|
-
name
|
|
64
|
+
detail: object
|
|
62
65
|
});
|
|
63
66
|
window.dispatchEvent(event);
|
|
64
67
|
}
|
|
65
68
|
|
|
66
|
-
|
|
67
|
-
loadHooks[name].forEach(callback => callback(object));
|
|
68
|
-
}
|
|
69
|
+
(_a = loadHooks[name]) === null || _a === void 0 ? void 0 : _a.forEach(callback => callback(object));
|
|
69
70
|
}
|