Fix CSS reloading on HCP in a non-hacky way

org.apache.cordova.file fixed this bug in 1.3
This commit is contained in:
Slava Kim
2014-08-14 21:33:26 -07:00
parent 9f55598050
commit eec07f72bb
2 changed files with 6 additions and 9 deletions

View File

@@ -4,7 +4,7 @@ Package.describe({
});
Cordova.depends({
'org.apache.cordova.file': '1.2.0',
'org.apache.cordova.file': '1.3.0',
'org.apache.cordova.file-transfer': '0.4.4'
});

View File

@@ -63,14 +63,11 @@
};
var loadStyle = function (url) {
var oReq = new XMLHttpRequest();
oReq.onload = function () {
var styleTag = document.createElement('style');
styleTag.innerHTML = this.responseText;
document.getElementsByTagName('head')[0].appendChild(styleTag);
};
oReq.open("get", url, true);
oReq.send();
var styleTag = document.createElement('link');
styleTag.rel = "stylesheet";
styleTag.type = "text/css";
styleTag.href = url;
document.getElementsByTagName('head')[0].appendChild(styleTag);
};
var loadAssetsFromManifest = function (manifest, urlPrefix) {