You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Clarify what are valid values for "identifier" in #call #76
Context#call(identifier, *args) is only tested against these identifiers in the test case:
"id"
"a.b.id"
"CoffeeScript.eval"
However, in the wild (example for Autoprefixer Rails) people are sending full JavaScript code as the "identifier". This works on some backend (Node.js), but fails on others (Duktape). What is the intended behaviour here? Should Duktape support full JavaScript in identifier, or should Autoprefixer Rails be fixed to first define it as a function?
MiniRacer: Also supports any JavaScript as identifier, but it's implemented as eval + JSON.generate(args) (see the TODO in the source) instead being directly serialized into the runtime.
Activity
rafaelfranca commentedon May 30, 2018
What is the behavior of other runtimes like mini_racer and therubyracer?
judofyr commentedon May 30, 2018
JSON.generate(args)(see the TODO in the source) instead being directly serialized into the runtime.rafaelfranca commentedon May 30, 2018
In that case I believe Duktabe should also support any JavaScript as identifier.
judofyr commentedon May 30, 2018
I'll try to create a PR with updated tests and documentation.