Closed jaredallard closed 8 years ago
the first argument to a javascript function appears as this
.
Try instead:
inject_js(this.l, function() { "use strict";
console.log(this, arguments);
}, "test_args")
Otherwise; pop(0)
does nothing: it removes 0
items from the lua stack :P
Thank you! On another question, how would I convert a JS array to a Lua table?
EDIT
Also, how would I pass two return values from js?
Thank you! On another question, how would I convert a JS array to a Lua table?
Observe:
script
inject_js
lua
output:
Hope that sums this up!