Open
Description
We already have js.Global.Call()
, but this only works for methods on the global object. Not all JS functions are methods. Several if these are exposed via the jsbuiltin
package I created a few years ago, but I wonder if it might make more sense to add the ability to call such functions (and by extension, any other functions in the default global namespace) directly via the js
package.
I'm imagining a package level Call
function which looks much *Object.Call
:
func Call(name string, args ...interface{}) *Object
This could effectively make jsbuiltin
obsolete, and would allow much simpler integration with many JS functions that otherwise require .inc.js
files to wrap a function in a method.
Metadata
Metadata
Assignees
Labels
No labels