summaryrefslogtreecommitdiff
path: root/src/lauxlib.js
diff options
context:
space:
mode:
authorBenoit Giannangeli <giann008@gmail.com>2017-08-09 10:35:45 +0200
committerBenoit Giannangeli <giann008@gmail.com>2017-08-10 08:48:24 +0200
commit10ce504e5defe8411f089c796dea370e9e14d014 (patch)
tree85811930305b8945b173340513497361fd5b1261 /src/lauxlib.js
parentf90446e631b244856e5f495d89491ee2356ecbef (diff)
downloadfengari-10ce504e5defe8411f089c796dea370e9e14d014.tar.gz
fengari-10ce504e5defe8411f089c796dea370e9e14d014.tar.bz2
fengari-10ce504e5defe8411f089c796dea370e9e14d014.zip
luaL_loadfile will load via xhr in the browser
Diffstat (limited to 'src/lauxlib.js')
-rw-r--r--src/lauxlib.js2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/lauxlib.js b/src/lauxlib.js
index d13b2bb..eb174be 100644
--- a/src/lauxlib.js
+++ b/src/lauxlib.js
@@ -816,7 +816,7 @@ if (!WEB) {
lf.f = lua.to_luastring(xhr.response);
} else {
lf.err = xhr.status;
- return errfile(L, "open", fnameindex, xhr.status);
+ return errfile(L, "open", fnameindex, { message: `${xhr.status}: ${xhr.statusText}` });
}
}
let com = skipcomment(lf);