From 3638492098a21aef63842366fbfc035fc6414fb0 Mon Sep 17 00:00:00 2001 From: Jose Antonio Marquez Date: Sun, 26 Feb 2012 11:32:10 -0800 Subject: Fixed issue with losing track of Ninja template css Also cleaned up URL getter for app in cleaning string code. --- js/document/html-document.js | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'js/document') diff --git a/js/document/html-document.js b/js/document/html-document.js index 472d15de..76436732 100755 --- a/js/document/html-document.js +++ b/js/document/html-document.js @@ -465,7 +465,8 @@ exports.HTMLDocument = Montage.create(TextDocument, { } } } else { - //None local stylesheet, probably on a CDN (locked) + /* +//None local stylesheet, probably on a CDN (locked) tag = this.iframe.contentWindow.document.createElement('style'); tag.setAttribute('type', 'text/css'); tag.setAttribute('data-ninja-external-url', this._document.styleSheets[i].href); @@ -473,8 +474,7 @@ exports.HTMLDocument = Montage.create(TextDocument, { tag.setAttribute('data-ninja-file-name', this._document.styleSheets[i].href.split('/')[this._document.styleSheets[i].href.split('/').length-1]); //TODO: Figure out cross-domain XHR issue, might need cloud to handle - /* -var xhr = new XMLHttpRequest(); + var xhr = new XMLHttpRequest(); xhr.open("GET", this._document.styleSheets[i].href, true); xhr.send(); // @@ -482,7 +482,6 @@ var xhr = new XMLHttpRequest(); console.log(xhr); } //tag.innerHTML = xhr.responseText //xhr.response; -*/ //Currently no external styles will load if unable to load via XHR request @@ -496,6 +495,7 @@ var xhr = new XMLHttpRequest(); this._templateDocument.head.insertBefore(tag, query[j]); } } +*/ } } } -- cgit v1.2.3