MCPcopy Create free account
hub / github.com/dop251/goja / proxyCall

Method proxyCall

proxy.go:157–168  ·  view source on GitHub ↗
(trap proxyTrap, args ...Value)

Source from the content-addressed store, hash-verified

155}
156
157func (h *jsProxyHandler) proxyCall(trap proxyTrap, args ...Value) (Value, bool) {
158 r := h.handler.runtime
159
160 if m := toMethod(r.getVStr(h.handler, unistring.String(trap.String()))); m != nil {
161 return m(FunctionCall{
162 This: h.handler,
163 Arguments: args,
164 }), true
165 }
166
167 return nil, false
168}
169
170func (h *jsProxyHandler) boolProxyCall(trap proxyTrap, args ...Value) (bool, bool) {
171 if v, ok := h.proxyCall(trap, args...); ok {

Callers 11

boolProxyCallMethod · 0.95
getPrototypeOfMethod · 0.95
getStrMethod · 0.95
getIdxMethod · 0.95
getSymMethod · 0.95
ownKeysMethod · 0.95
applyMethod · 0.95
constructMethod · 0.95

Calls 4

StringTypeAlias · 0.92
toMethodFunction · 0.85
getVStrMethod · 0.80
StringMethod · 0.65

Tested by

no test coverage detected