aboutsummaryrefslogtreecommitdiff
path: root/js/document/document-html.js
diff options
context:
space:
mode:
Diffstat (limited to 'js/document/document-html.js')
-rwxr-xr-xjs/document/document-html.js14
1 files changed, 9 insertions, 5 deletions
diff --git a/js/document/document-html.js b/js/document/document-html.js
index 8b82c40f..56f4e3d3 100755
--- a/js/document/document-html.js
+++ b/js/document/document-html.js
@@ -36,7 +36,7 @@ exports.HtmlDocument = Montage.create(Component, {
36 //////////////////////////////////////////////////////////////////// 36 ////////////////////////////////////////////////////////////////////
37 // 37 //
38 exclusionList: { 38 exclusionList: {
39 value: ["HTML", "BODY", "NINJA-CONTENT"] 39 value: ["HTML", "BODY", "NINJA-CONTENT", "NINJA-VIEWPORT"]
40 }, 40 },
41 //////////////////////////////////////////////////////////////////// 41 ////////////////////////////////////////////////////////////////////
42 // 42 //
@@ -108,6 +108,12 @@ exports.HtmlDocument = Montage.create(Component, {
108 handleViewReady: { 108 handleViewReady: {
109 value: function(mObjects) { 109 value: function(mObjects) {
110 this.model.mObjects = mObjects; 110 this.model.mObjects = mObjects;
111 // TODO: Find a better way to initialize this property
112 // Assign the domContainer to be the document root on open
113 if(typeof this.model.domContainer !== "undefined") {
114 this.model.domContainer = this.model.documentRoot;
115 }
116
111 //Making callback after view is loaded 117 //Making callback after view is loaded
112 this.loaded.callback.call(this.loaded.context, this); 118 this.loaded.callback.call(this.loaded.context, this);
113 } 119 }
@@ -116,10 +122,8 @@ exports.HtmlDocument = Montage.create(Component, {
116 // 122 //
117 closeDocument: { 123 closeDocument: {
118 value: function (context, callback) { 124 value: function (context, callback) {
119 //Closing document and getting outcome 125 //Closing document (sending null to close all views)
120 var closed = this.model.close(null); 126 this.model.close(null, function () {if (callback) callback.call(context, this);}.bind(this));
121 //Making callback if specified
122 if (callback) callback.call(context, this);
123 } 127 }
124 }, 128 },
125 //////////////////////////////////////////////////////////////////// 129 ////////////////////////////////////////////////////////////////////