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

Method proxySetPreCheck

proxy.go:638–643  ·  view source on GitHub ↗
(trapResult, throw bool, name fmt.Stringer)

Source from the content-addressed store, hash-verified

636}
637
638func (p *proxyObject) proxySetPreCheck(trapResult, throw bool, name fmt.Stringer) bool {
639 if !trapResult {
640 p.val.runtime.typeErrorResult(throw, "'set' on proxy: trap returned falsish for property '%s'", name.String())
641 }
642 return trapResult
643}
644
645func (p *proxyObject) proxySetPostCheck(targetProp, value Value, name fmt.Stringer) {
646 if prop, ok := targetProp.(*valueProperty); ok {

Callers 3

proxySetStrMethod · 0.95
proxySetIdxMethod · 0.95
proxySetSymMethod · 0.95

Calls 2

typeErrorResultMethod · 0.80
StringMethod · 0.65

Tested by

no test coverage detected