diff options
author | Jose Dapena Paz <jdapena@igalia.com> | 2022-05-31 18:40:52 +0200 |
---|---|---|
committer | Jose Dapena Paz <jdapena@igalia.com> | 2022-05-31 20:13:54 +0200 |
commit | 69af4d9b9b209fcb33ef9071ddfa8561106044c2 (patch) | |
tree | 04b7d41ca675886d7169771a4cad2b0fcf13c750 /src/js/templates.js | |
parent | 6de51f102451a9f63e6f597e99104eff14c5c2c1 (diff) |
Adapt to new application frameworkneedlefish_13.93.0needlefish/13.93.013.93.0
Drop usage of agl-js-api, and just provide a mock for bluetooth
and network calls.
Bug-AGL: SPEC-4248
Signed-off-by: Jose Dapena Paz <jdapena@igalia.com>
Change-Id: I9265a44f810012dd68ccfdd675de157156a73f79
Diffstat (limited to 'src/js/templates.js')
-rw-r--r-- | src/js/templates.js | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/js/templates.js b/src/js/templates.js index 2513722..4b71638 100644 --- a/src/js/templates.js +++ b/src/js/templates.js @@ -2,12 +2,12 @@ export function load(template) { return new Promise(function(resolve, reject){ var xhr = new XMLHttpRequest(); - xhr.open('GET', '/templates/'+template); + xhr.open('GET', './templates/'+template); xhr.send(); xhr.onload = function() { - if (xhr.status != 200) { + if (xhr.status != 200 && xhr.status != 0) { console.error('Error loading template', xhr.status, xhr.statusText); reject(xhr.status); } else { |