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

Method _setOwnIdx

object_template.go:388–394  ·  view source on GitHub ↗
(idx uint32)

Source from the content-addressed store, hash-verified

386}
387
388func (a *templatedArrayObject) _setOwnIdx(idx uint32) {
389 lenProp := a.getLenProp()
390 l := uint32(lenProp.value.ToInteger())
391 if idx >= l {
392 lenProp.value = intToValue(int64(idx) + 1)
393 }
394}
395
396func (a *templatedArrayObject) setLength(l uint32, throw bool) bool {
397 lenProp := a.getLenProp()

Callers 4

setOwnStrMethod · 0.95
setOwnIdxMethod · 0.95
defineOwnPropertyStrMethod · 0.95
defineOwnPropertyIdxMethod · 0.95

Calls 3

getLenPropMethod · 0.95
intToValueFunction · 0.85
ToIntegerMethod · 0.65

Tested by

no test coverage detected