summaryrefslogtreecommitdiff
path: root/README.md
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 /README.md
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 'README.md')
-rw-r--r--README.md4
1 files changed, 4 insertions, 0 deletions
diff --git a/README.md b/README.md
index 7cb3ef6..4ce66c7 100644
--- a/README.md
+++ b/README.md
@@ -22,6 +22,10 @@ Lua strings are 8-bits clean and can embed `\0`. Which means that invalid UTF-8/
To address that issue, Lua strings are represented by an array of bytes in Fengari. To push a JS string on the stack you can use `lua_pushliteral` which will convert it to an array of bytes before pushing it. To get a Lua string on the stack as a JS string you can use `lua_tojsstring` which will attempt to convert it to a UTF-16 JS string. The latter won't give you what you expect if the Lua string is not a valid UTF-16 sequence. You can also convert strings with `lua.to_luastring` and `lua.to_jsstring`.
+### `require` and `package.loadlib`
+
+In the browser `require` and `package.loadlib` try to find a file by making XHR requests.
+
### _Missing_ features
- `lua_gc`/`collectgarbage`: Fengari relies on the JS garbage collector and does not implement its own.