From a6db492176a85546047dae6d5ecb9cfc4325e043 Mon Sep 17 00:00:00 2001 From: Jose Antonio Marquez Date: Thu, 24 May 2012 11:44:35 -0700 Subject: Final clean up of render callback for design view --- js/document/document-html.js | 2 -- js/document/views/design.js | 2 ++ 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/js/document/document-html.js b/js/document/document-html.js index 157d7a0e..c60a12a2 100755 --- a/js/document/document-html.js +++ b/js/document/document-html.js @@ -83,8 +83,6 @@ exports.HtmlDocument = Montage.create(Component, { this.model.views.design.model = this.model; //Rendering design view, using observers to know when template is ready this.model.views.design.render(function () { - //TODO: Why is this needed? - this.model.views.design._liveNodeList = this.documentRoot.getElementsByTagName('*'); //Adding observer to know when template is ready this._observer = new WebKitMutationObserver(this.handleTemplateReady.bind(this)); this._observer.observe(this.model.views.design.document.head, {childList: true}); diff --git a/js/document/views/design.js b/js/document/views/design.js index 06708957..d772aa86 100755 --- a/js/document/views/design.js +++ b/js/document/views/design.js @@ -286,6 +286,8 @@ exports.DesignDocumentView = Montage.create(BaseDocumentView, { } else { this.model.documentRoot = this.document.body; } + //Storing node list for reference (might need to store in the model) + this._liveNodeList = this.model.documentRoot.getElementsByTagName('*'); //Initiliazing document model document.application.njUtils.makeElementModel(this.model.documentRoot, "Body", "body"); //Makign callback if specified -- cgit v1.2.3