Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
import "ember-routing-views";
import environment from "ember-metal/environment";
import { runLoadHooks } from 'ember-runtime/system/lazy_load';
if (Ember.__loader.registry['ember-template-compiler']) {
requireModule('ember-template-compiler');
}
// do this to ensure that Ember.Test is defined properly on the global
// if it is present.
if (Ember.__loader.registry['ember-testing']) {
requireModule('ember-testing');
}
runLoadHooks('Ember');
/**
Ember
@module ember
*/
Ember.deprecate(
'Usage of Ember is deprecated for Internet Explorer 6 and 7, support will be removed in the next major version.',
!environment.userAgent.match(/MSIE [67]/)
);
EmberHandlebars.registerHelper('bindAttr', bindAttrHelperDeprecated);
EmberHandlebars.registerHelper('collection', collectionHelper);
EmberHandlebars.registerHelper("log", logHelper);
EmberHandlebars.registerHelper("debugger", debuggerHelper);
EmberHandlebars.registerHelper("each", eachHelper);
EmberHandlebars.registerHelper("loc", locHelper);
EmberHandlebars.registerHelper("partial", partialHelper);
EmberHandlebars.registerHelper("template", templateHelper);
EmberHandlebars.registerHelper("yield", yieldHelper);
EmberHandlebars.registerHelper("view", viewHelper);
EmberHandlebars.registerHelper("unbound", unboundHelper);
EmberHandlebars.registerHelper("input", inputHelper);
EmberHandlebars.registerHelper("textarea", textareaHelper);
// run load hooks
runLoadHooks('Ember.Handlebars', EmberHandlebars);
export default EmberHandlebars;
_bootSync() {
if (this._booted) { return; }
// Even though this returns synchronously, we still need to make sure the
// boot promise exists for book-keeping purposes: if anything went wrong in
// the boot process, we need to store the error as a rejection on the boot
// promise so that a future caller of `boot()` can tell what failed.
let defer = this._bootResolver = new RSVP.defer();
this._bootPromise = defer.promise;
try {
this.runInitializers();
runLoadHooks('application', this);
this.advanceReadiness();
// Continues to `didBecomeReady`
} catch(error) {
// For the asynchronous boot path
defer.reject(error);
// For the synchronous boot path
throw error;
}
},
boot() {
if (this._bootPromise) { return this._bootPromise; }
var defer = new Ember.RSVP.defer();
this._bootPromise = defer.promise;
this._bootResolver = defer;
this.runInitializers(this.registry);
runLoadHooks('application', this);
this.advanceReadiness();
return this._bootPromise;
},