aboutsummaryrefslogtreecommitdiff
path: root/js/document/html-document.js
diff options
context:
space:
mode:
Diffstat (limited to 'js/document/html-document.js')
-rwxr-xr-xjs/document/html-document.js12
1 files changed, 11 insertions, 1 deletions
diff --git a/js/document/html-document.js b/js/document/html-document.js
index 143b1598..eaf56146 100755
--- a/js/document/html-document.js
+++ b/js/document/html-document.js
@@ -23,6 +23,7 @@ exports.HTMLDocument = Montage.create(TextDocument, {
23 23
24 _document: { value: null, enumerable: false }, 24 _document: { value: null, enumerable: false },
25 _documentRoot: { value: null, enumerable: false }, 25 _documentRoot: { value: null, enumerable: false },
26 _liveNodeList: { value: null, enumarable: false },
26 _stageBG: { value: null, enumerable: false }, 27 _stageBG: { value: null, enumerable: false },
27 _window: { value: null, enumerable: false }, 28 _window: { value: null, enumerable: false },
28 _styles: { value: null, enumerable: false }, 29 _styles: { value: null, enumerable: false },
@@ -402,7 +403,16 @@ exports.HTMLDocument = Montage.create(TextDocument, {
402 //Adding a handler for the main user document reel to finish loading 403 //Adding a handler for the main user document reel to finish loading
403 this._document.body.addEventListener("userTemplateDidLoad", this.userTemplateDidLoad.bind(this), false); 404 this._document.body.addEventListener("userTemplateDidLoad", this.userTemplateDidLoad.bind(this), false);
404 405
405 406 // Live node list of the current loaded document
407 this._liveNodeList = this.documentRoot.getElementsByTagName('*');
408
409 // TODO Move this to the appropriate location
410 var len = this._liveNodeList.length;
411
412 for(var i = 0; i < len; i++) {
413 NJUtils.makeModelFromElement(this._liveNodeList[i]);
414 }
415
406 /* this.iframe.contentWindow.document.addEventListener('DOMSubtreeModified', function (e) { */ //TODO: Remove events upon loading once 416 /* this.iframe.contentWindow.document.addEventListener('DOMSubtreeModified', function (e) { */ //TODO: Remove events upon loading once
407 417
408 //TODO: When re-written, the best way to initialize the document is to listen for the DOM tree being modified 418 //TODO: When re-written, the best way to initialize the document is to listen for the DOM tree being modified