cesanta / v7

Embedded JavaScript engine for C/C++

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Please implement Function.prototype.call()

realzeus opened this issue · comments

This is very similar to Function.prototype.apply()

The call() method calls a function with a given this value and arguments provided individually.
The apply() method calls a function with a given this value and arguments provided as an array.

See call() and apply()

call is implemented, see: https://github.com/cesanta/v7/blob/39d1ca7/v7.c#L24474

The build is guarded by V7_ENABLE__Function__call, which is enabled in the full build profile.

However https://github.com/smartjs doesn't have that flag enabled. I'll add it, now that stdlib is cheap; but it's not a V7 issue.

@realzeus FYI, Function.prototype.call enabled in ESP8266 SJS build since: cesanta/mongoose-os@09e12b6