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

Method proxyDefineOwnPropertyPreCheck

proxy.go:377–383  ·  view source on GitHub ↗
(trapResult, throw bool)

Source from the content-addressed store, hash-verified

375}
376
377func (p *proxyObject) proxyDefineOwnPropertyPreCheck(trapResult, throw bool) bool {
378 if !trapResult {
379 p.val.runtime.typeErrorResult(throw, "'defineProperty' on proxy: trap returned falsish")
380 return false
381 }
382 return true
383}
384
385func (p *proxyObject) proxyDefineOwnPropertyPostCheck(prop Value, target *Object, descr PropertyDescriptor) {
386 targetDesc := propToValueProp(prop)

Callers 3

defineOwnPropertyStrMethod · 0.95
defineOwnPropertyIdxMethod · 0.95
defineOwnPropertySymMethod · 0.95

Calls 1

typeErrorResultMethod · 0.80

Tested by

no test coverage detected