aboutsummaryrefslogtreecommitdiff
path: root/js/document/document-html.js
diff options
context:
space:
mode:
authorJose Antonio Marquez2012-06-07 11:28:25 -0700
committerJose Antonio Marquez2012-06-07 11:28:25 -0700
commit7d1a564a8fd246c621f674b5521554fbfc058281 (patch)
treed1be340a099e318db8113b651ba45c3d4c00f3a5 /js/document/document-html.js
parent0efbbf8287517b755be1774f6aa49947bed50a0d (diff)
parentb75fe9369f7caec0351d298f7106c8d59572b440 (diff)
downloadninja-7d1a564a8fd246c621f674b5521554fbfc058281.tar.gz
Merge branch 'refs/heads/Ninja-Internal' into FileIO
Diffstat (limited to 'js/document/document-html.js')
-rwxr-xr-xjs/document/document-html.js10
1 files changed, 7 insertions, 3 deletions
diff --git a/js/document/document-html.js b/js/document/document-html.js
index c9acd2e0..04565753 100755
--- a/js/document/document-html.js
+++ b/js/document/document-html.js
@@ -90,7 +90,7 @@ exports.HtmlDocument = Montage.create(Component, {
90 //Adding observer to know when template is ready 90 //Adding observer to know when template is ready
91 this._observer = new WebKitMutationObserver(this.handleTemplateReady.bind(this)); 91 this._observer = new WebKitMutationObserver(this.handleTemplateReady.bind(this));
92 this._observer.observe(this.model.views.design.document.head, {childList: true}); 92 this._observer.observe(this.model.views.design.document.head, {childList: true});
93 }.bind(this), template); 93 }.bind(this), template, {viewCallback: this.handleViewReady, context: this});
94 } else { 94 } else {
95 //TODO: Identify default view (probably code) 95 //TODO: Identify default view (probably code)
96 } 96 }
@@ -103,10 +103,14 @@ exports.HtmlDocument = Montage.create(Component, {
103 //Removing observer, only needed on initial load 103 //Removing observer, only needed on initial load
104 this._observer.disconnect(); 104 this._observer.disconnect();
105 this._observer = null; 105 this._observer = null;
106 //Making callback after view is loaded
107 this.loaded.callback.call(this.loaded.context, this);
108 } 106 }
109 }, 107 },
108 handleViewReady: {
109 value: function() {
110 //Making callback after view is loaded
111 this.loaded.callback.call(this.loaded.context, this);
112 }
113 },
110 //////////////////////////////////////////////////////////////////// 114 ////////////////////////////////////////////////////////////////////
111 // 115 //
112 closeDocument: { 116 closeDocument: {