diff options
author | Pushkar Joshi | 2012-06-11 14:07:13 -0700 |
---|---|---|
committer | Pushkar Joshi | 2012-06-11 14:07:13 -0700 |
commit | 71bc93ad0d53a77d70c688b2b3aacf694dd1de91 (patch) | |
tree | a432a4652bf7c96aea72a22bf27946eeee8fc4a5 /js/document/document-html.js | |
parent | 76db3eb0aa4ffe9e75812db570c793e9f852f853 (diff) | |
parent | 756cbfad2b98b300af8db3793aa21718b88dd950 (diff) | |
download | ninja-71bc93ad0d53a77d70c688b2b3aacf694dd1de91.tar.gz |
Merge branch 'master' into brushtool
Diffstat (limited to 'js/document/document-html.js')
-rwxr-xr-x | js/document/document-html.js | 10 |
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: { |