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

Method setOwnStr

object_dynamic.go:253–264  ·  view source on GitHub ↗
(p unistring.String, v Value, throw bool)

Source from the content-addressed store, hash-verified

251}
252
253func (o *dynamicObject) setOwnStr(p unistring.String, v Value, throw bool) bool {
254 prop := p.String()
255 if !o.d.Has(prop) {
256 if proto := o.prototype; proto != nil {
257 // we know it's foreign because prototype loops are not allowed
258 if res, handled := proto.self.setForeignStr(p, v, o.val, throw); handled {
259 return res
260 }
261 }
262 }
263 return o._set(prop, v, throw)
264}
265
266func (o *dynamicObject) setOwnIdx(p valueInt, v Value, throw bool) bool {
267 prop := p.String()

Callers

nothing calls this directly

Calls 4

_setMethod · 0.95
StringMethod · 0.65
HasMethod · 0.65
setForeignStrMethod · 0.65

Tested by

no test coverage detected