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

Method getStrWithOwnProp

object.go:324–338  ·  view source on GitHub ↗
(prop Value, name unistring.String, receiver Value)

Source from the content-addressed store, hash-verified

322}
323
324func (o *baseObject) getStrWithOwnProp(prop Value, name unistring.String, receiver Value) Value {
325 if prop == nil && o.prototype != nil {
326 if receiver == nil {
327 return o.prototype.self.getStr(name, o.val)
328 }
329 return o.prototype.self.getStr(name, receiver)
330 }
331 if prop, ok := prop.(*valueProperty); ok {
332 if receiver == nil {
333 return prop.get(o.val)
334 }
335 return prop.get(receiver)
336 }
337 return prop
338}
339
340func (o *baseObject) getIdx(idx valueInt, receiver Value) Value {
341 return o.val.self.getStr(idx.string(), receiver)

Callers 8

getStrMethod · 0.80
getStrMethod · 0.80
getStrMethod · 0.80
getStrMethod · 0.80
getStrMethod · 0.80
getStrMethod · 0.80
getStrMethod · 0.80
getStrMethod · 0.80

Calls 2

getStrMethod · 0.65
getMethod · 0.65

Tested by

no test coverage detected