MCPcopy
hub / github.com/gopherjs/gopherjs / MakeFunc

Function MakeFunc

js/js.go:121–123  ·  view source on GitHub ↗

MakeFunc wraps a function and gives access to the values of JavaScript's "this" and "arguments" keywords.

(fn func(this *Object, arguments []*Object) any)

Source from the content-addressed store, hash-verified

119
120// MakeFunc wraps a function and gives access to the values of JavaScript's "this" and "arguments" keywords.
121func MakeFunc(fn func(this *Object, arguments []*Object) any) *Object {
122 return Global.Call("$makeFunc", InternalObject(fn))
123}
124
125// Keys returns the keys of the given JavaScript object.
126func Keys(o *Object) []string {

Callers 6

MakeFuncFunction · 0.92
makeMethodValueFunction · 0.92
MethodMethod · 0.92
makeMethodValueFunction · 0.92
FuncOfFunction · 0.92
TestMakeFuncFunction · 0.92

Calls 2

InternalObjectFunction · 0.85
CallMethod · 0.45

Tested by 1

TestMakeFuncFunction · 0.74

Used in the wild real call sites across dependent graphs

searching dependent graphs…