diff options
Diffstat (limited to 'js/document/document-html.js')
-rwxr-xr-x | js/document/document-html.js | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/js/document/document-html.js b/js/document/document-html.js index 7e1f1806..9bbea4c9 100755 --- a/js/document/document-html.js +++ b/js/document/document-html.js | |||
@@ -100,15 +100,14 @@ exports.HtmlDocument = Montage.create(Component, { | |||
100 | this._document = this.model.views.design.document; | 100 | this._document = this.model.views.design.document; |
101 | //TODO: Remove usage, seems as not needed | 101 | //TODO: Remove usage, seems as not needed |
102 | if (template && template.type === 'banner') { | 102 | if (template && template.type === 'banner') { |
103 | //this.documentRoot = this.model.views.design.document.body; | 103 | this.documentRoot = this.model.views.design.document.body.getElementsByTagName('ninja-content')[0]; |
104 | this.documentRoot = this.model.views.design.document.body.getElementsByTagName('ninja-banner')[0]; | ||
105 | } else { | 104 | } else { |
106 | this.documentRoot = this.model.views.design.document.body; | 105 | this.documentRoot = this.model.views.design.document.body; |
107 | } | 106 | } |
108 | //TODO: Why is this needed? | 107 | //TODO: Why is this needed? |
109 | this._liveNodeList = this.model.views.design.document.body.getElementsByTagName('*'); | 108 | this._liveNodeList = this.documentRoot.getElementsByTagName('*'); |
110 | //Initiliazing document model | 109 | //Initiliazing document model |
111 | document.application.njUtils.makeElementModel(this.model.views.design.document.body, "Body", "body"); | 110 | document.application.njUtils.makeElementModel(this.documentRoot, "Body", "body"); |
112 | //Adding observer to know when template is ready | 111 | //Adding observer to know when template is ready |
113 | this._observer = new WebKitMutationObserver(this.handleTemplateReady.bind(this)); | 112 | this._observer = new WebKitMutationObserver(this.handleTemplateReady.bind(this)); |
114 | this._observer.observe(this.model.views.design.document.head, {childList: true}); | 113 | this._observer.observe(this.model.views.design.document.head, {childList: true}); |