1- // ==========================================================================
2- // Project: Ember - JavaScript Application Framework
3- // Copyright: ©2006-2011 Strobe Inc. and contributors.
4- // Portions ©2008-2011 Apple Inc. All rights reserved.
5- // License: Licensed under MIT license (see license.js)
6- // ==========================================================================
1+ /**
2+ @module ember
3+ @submodule ember-application
4+ */
75
86var get = Ember . get , set = Ember . set ;
97
108/**
11- @class
12-
139 An instance of `Ember.Application` is the starting point for every Ember.js
1410 application. It helps to instantiate, initialize and coordinate the many
1511 objects that make up your app.
@@ -184,6 +180,8 @@ var get = Ember.get, set = Ember.set;
184180 App.ApplicationController = Ember.Controller.extend();
185181 ```
186182
183+ @class Application
184+ @namespace Ember
187185 @extends Ember.Namespace
188186*/
189187Ember . Application = Ember . Namespace . extend (
@@ -198,6 +196,7 @@ Ember.Application = Ember.Namespace.extend(
198196 `eventDispatcher`, which sets up the listeners for event delegation. Every
199197 view in your application should be a child of the element you specify here.
200198
199+ @property rootElement
201200 @type DOMElement
202201 @default 'body'
203202 */
@@ -213,6 +212,7 @@ Ember.Application = Ember.Namespace.extend(
213212
214213 See the documentation for `Ember.EventDispatcher` for more information.
215214
215+ @property eventDispatcher
216216 @type Ember.EventDispatcher
217217 @default null
218218 */
@@ -239,12 +239,12 @@ Ember.Application = Ember.Namespace.extend(
239239 }
240240 });
241241
242+ @property customEvents
242243 @type Object
243244 @default null
244245 */
245246 customEvents : null ,
246247
247- /** @private */
248248 init : function ( ) {
249249 if ( ! this . $ ) { this . $ = Ember . $ ; }
250250
@@ -306,6 +306,9 @@ Ember.Application = Ember.Namespace.extend(
306306 router.get('commentsController') // <App.CommentsController:ember1235>
307307
308308 router.get('postsController.router') // router
309+
310+ @method initialize
311+ @param router {Ember.Router}
309312 */
310313 initialize : function ( router ) {
311314 var injections = get ( this . constructor , 'injections' ) ,
@@ -350,7 +353,6 @@ Ember.Application = Ember.Namespace.extend(
350353 return this ;
351354 } ,
352355
353- /** @private */
354356 didBecomeReady : function ( ) {
355357 var eventDispatcher = get ( this , 'eventDispatcher' ) ,
356358 customEvents = get ( this , 'customEvents' ) ,
@@ -372,6 +374,9 @@ Ember.Application = Ember.Namespace.extend(
372374
373375 If the application has a router, use it to route to the current URL, and
374376 trigger a new call to `route` whenever the URL changes.
377+
378+ @method startRouting
379+ @property router {Ember.Router}
375380 */
376381 startRouting : function ( router ) {
377382 var location = get ( router , 'location' ) ,
@@ -396,10 +401,11 @@ Ember.Application = Ember.Namespace.extend(
396401 /**
397402 Called when the Application has become ready.
398403 The call will be delayed until the DOM has become ready.
404+
405+ @event ready
399406 */
400407 ready : Ember . K ,
401408
402- /** @private */
403409 willDestroy : function ( ) {
404410 get ( this , 'eventDispatcher' ) . destroy ( ) ;
405411 if ( this . _createdRouter ) { this . _createdRouter . destroy ( ) ; }
0 commit comments