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

Method defineOwnPropertyStr

proxy.go:411–421  ·  view source on GitHub ↗
(name unistring.String, descr PropertyDescriptor, throw bool)

Source from the content-addressed store, hash-verified

409}
410
411func (p *proxyObject) defineOwnPropertyStr(name unistring.String, descr PropertyDescriptor, throw bool) bool {
412 target := p.target
413 if booleanTrapResult, ok := p.checkHandler().definePropertyStr(target, name, descr); ok {
414 if !p.proxyDefineOwnPropertyPreCheck(booleanTrapResult, throw) {
415 return false
416 }
417 p.proxyDefineOwnPropertyPostCheck(target.self.getOwnPropStr(name), target, descr)
418 return true
419 }
420 return target.self.defineOwnPropertyStr(name, descr, throw)
421}
422
423func (p *proxyObject) defineOwnPropertyIdx(idx valueInt, descr PropertyDescriptor, throw bool) bool {
424 target := p.target

Callers

nothing calls this directly

Calls 6

checkHandlerMethod · 0.95
definePropertyStrMethod · 0.65
getOwnPropStrMethod · 0.65
defineOwnPropertyStrMethod · 0.65

Tested by

no test coverage detected