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

Method defineOwnPropertySym

proxy.go:436–447  ·  view source on GitHub ↗
(s *Symbol, descr PropertyDescriptor, throw bool)

Source from the content-addressed store, hash-verified

434}
435
436func (p *proxyObject) defineOwnPropertySym(s *Symbol, descr PropertyDescriptor, throw bool) bool {
437 target := p.target
438 if booleanTrapResult, ok := p.checkHandler().definePropertySym(target, s, descr); ok {
439 if !p.proxyDefineOwnPropertyPreCheck(booleanTrapResult, throw) {
440 return false
441 }
442 p.proxyDefineOwnPropertyPostCheck(target.self.getOwnPropSym(s), target, descr)
443 return true
444 }
445
446 return target.self.defineOwnPropertySym(s, descr, throw)
447}
448
449func (p *proxyObject) proxyHasChecks(targetProp Value, target *Object, name fmt.Stringer) {
450 targetDesc := propToValueProp(targetProp)

Callers

nothing calls this directly

Calls 6

checkHandlerMethod · 0.95
definePropertySymMethod · 0.65
getOwnPropSymMethod · 0.65
defineOwnPropertySymMethod · 0.65

Tested by

no test coverage detected