diff options
Diffstat (limited to 'js/document/html-document.js')
-rwxr-xr-x | js/document/html-document.js | 19 |
1 files changed, 10 insertions, 9 deletions
diff --git a/js/document/html-document.js b/js/document/html-document.js index 6e1f654b..a05219bc 100755 --- a/js/document/html-document.js +++ b/js/document/html-document.js | |||
@@ -614,12 +614,9 @@ exports.HTMLDocument = Montage.create(TextDocument, { | |||
614 | } | 614 | } |
615 | } | 615 | } |
616 | } | 616 | } |
617 | |||
618 | |||
619 | |||
620 | |||
621 | /* | 617 | /* |
622 | //TODO: Figure out cross-domain XHR issue, might need cloud to handle | 618 | |
619 | //TODO: Figure out cross-domain XHR issue, might need cloud to handle | ||
623 | var xhr = new XMLHttpRequest(); | 620 | var xhr = new XMLHttpRequest(); |
624 | xhr.open("GET", this._document.styleSheets[i].href, true); | 621 | xhr.open("GET", this._document.styleSheets[i].href, true); |
625 | xhr.send(); | 622 | xhr.send(); |
@@ -627,15 +624,19 @@ exports.HTMLDocument = Montage.create(TextDocument, { | |||
627 | if (xhr.readyState === 4) { | 624 | if (xhr.readyState === 4) { |
628 | console.log(xhr); | 625 | console.log(xhr); |
629 | } | 626 | } |
630 | */ | ||
631 | //tag.innerHTML = xhr.responseText //xhr.response; | 627 | //tag.innerHTML = xhr.responseText //xhr.response; |
632 | tag.innerHTML = 'noRULEjustHACK{background: #000}' | 628 | */ |
633 | //Currently no external styles will load if unable to load via XHR request | 629 | //Temp rule so it's registered in the array |
634 | 630 | tag.innerHTML = 'noRULEjustHACK{background: #000}'; | |
635 | //Disabling external style sheets | 631 | //Disabling external style sheets |
636 | query = this._templateDocument.html.querySelectorAll(['link']); | 632 | query = this._templateDocument.html.querySelectorAll(['link']); |
637 | for (var k in query) { | 633 | for (var k in query) { |
638 | if (query[k].href === this._document.styleSheets[i].href) { | 634 | if (query[k].href === this._document.styleSheets[i].href) { |
635 | |||
636 | //TODO: Removed the temp insertion of the stylesheet | ||
637 | //because it wasn't the proper way to do it | ||
638 | //need to be handled via XHR with proxy in Cloud Sim | ||
639 | |||
639 | //Disabling style sheet to reload via inserting in style tag | 640 | //Disabling style sheet to reload via inserting in style tag |
640 | //var tempCSS = query[k].cloneNode(true); | 641 | //var tempCSS = query[k].cloneNode(true); |
641 | //tempCSS.setAttribute('data-ninja-template', 'true'); | 642 | //tempCSS.setAttribute('data-ninja-template', 'true'); |