diff options
Diffstat (limited to 'js/document/html-document.js')
-rwxr-xr-x | js/document/html-document.js | 12 |
1 files changed, 11 insertions, 1 deletions
diff --git a/js/document/html-document.js b/js/document/html-document.js index 9a7755e6..b13dcc1e 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 }, |
@@ -396,7 +397,16 @@ exports.HTMLDocument = Montage.create(TextDocument, { | |||
396 | // Adding a handler for the main user document reel to finish loading. | 397 | // Adding a handler for the main user document reel to finish loading. |
397 | this._document.body.addEventListener("userTemplateDidLoad", this.userTemplateDidLoad.bind(this), false); | 398 | this._document.body.addEventListener("userTemplateDidLoad", this.userTemplateDidLoad.bind(this), false); |
398 | 399 | ||
399 | 400 | // Live node list of the current loaded document | |
401 | this._liveNodeList = this.documentRoot.getElementsByTagName('*'); | ||
402 | |||
403 | // TODO Move this to the appropriate location | ||
404 | var len = this._liveNodeList.length; | ||
405 | |||
406 | for(var i = 0; i < len; i++) { | ||
407 | NJUtils.makeElementModel2(this._liveNodeList[i]); | ||
408 | } | ||
409 | |||
400 | /* this.iframe.contentWindow.document.addEventListener('DOMSubtreeModified', function (e) { */ //TODO: Remove events upon loading once | 410 | /* this.iframe.contentWindow.document.addEventListener('DOMSubtreeModified', function (e) { */ //TODO: Remove events upon loading once |
401 | 411 | ||
402 | //TODO: When written, the best way to initialize the document is to listen for the DOM tree being modified | 412 | //TODO: When written, the best way to initialize the document is to listen for the DOM tree being modified |