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

Method defineOwnProperty

object.go:1615–1624  ·  view source on GitHub ↗
(n Value, desc PropertyDescriptor, throw bool)

Source from the content-addressed store, hash-verified

1613}
1614
1615func (o *Object) defineOwnProperty(n Value, desc PropertyDescriptor, throw bool) bool {
1616 switch n := n.(type) {
1617 case valueInt:
1618 return o.self.defineOwnPropertyIdx(n, desc, throw)
1619 case *Symbol:
1620 return o.self.defineOwnPropertySym(n, desc, throw)
1621 default:
1622 return o.self.defineOwnPropertyStr(n.string(), desc, throw)
1623 }
1624}
1625
1626func (o *Object) getId() uint64 {
1627 return uint64(uintptr(unsafe.Pointer(o)))

Callers 11

execMethod · 0.80
execMethod · 0.80
execMethod · 0.80
execMethod · 0.80
createDataPropertyFunction · 0.80
_definePropertiesMethod · 0.80
object_definePropertyMethod · 0.80
object_sealMethod · 0.80
object_freezeMethod · 0.80

Calls 4

defineOwnPropertyIdxMethod · 0.65
defineOwnPropertySymMethod · 0.65
defineOwnPropertyStrMethod · 0.65
stringMethod · 0.65

Tested by

no test coverage detected