diff options
author | 2022-05-31 16:21:54 +0200 | |
---|---|---|
committer | 2022-06-01 11:04:37 +0200 | |
commit | 266985a5eddc7df30126e79105e22dfb1dae140c (patch) | |
tree | 3fe2dd59b9dbe642484f86aec55c8b5b567d4c97 /src/js/templates.js | |
parent | 9fcfee6f23fb9aa2f59e65a8b3f5bdb9aa64ec23 (diff) |
Adapt to new application framework
Drop usage of agl-js-api, and just provide a mock for mediaplayer
calls.
Bug-AGL: SPEC-4248
Signed-off-by: Jose Dapena Paz <jdapena@igalia.com>
Change-Id: I8461713c56f2a81e3e1eda441e10da45f96c8087
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 { |