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

Method defineOwnPropertyIdx

proxy.go:423–434  ·  view source on GitHub ↗
(idx valueInt, descr PropertyDescriptor, throw bool)

Source from the content-addressed store, hash-verified

421}
422
423func (p *proxyObject) defineOwnPropertyIdx(idx valueInt, descr PropertyDescriptor, throw bool) bool {
424 target := p.target
425 if booleanTrapResult, ok := p.checkHandler().definePropertyIdx(target, idx, descr); ok {
426 if !p.proxyDefineOwnPropertyPreCheck(booleanTrapResult, throw) {
427 return false
428 }
429 p.proxyDefineOwnPropertyPostCheck(target.self.getOwnPropIdx(idx), target, descr)
430 return true
431 }
432
433 return target.self.defineOwnPropertyIdx(idx, descr, throw)
434}
435
436func (p *proxyObject) defineOwnPropertySym(s *Symbol, descr PropertyDescriptor, throw bool) bool {
437 target := p.target

Callers

nothing calls this directly

Calls 6

checkHandlerMethod · 0.95
definePropertyIdxMethod · 0.65
getOwnPropIdxMethod · 0.65
defineOwnPropertyIdxMethod · 0.65

Tested by

no test coverage detected