(name unistring.String, throw bool)
| 904 | } |
| 905 | |
| 906 | func (a *typedArrayObject) deleteStr(name unistring.String, throw bool) bool { |
| 907 | idx, ok := strToIntNum(name) |
| 908 | if ok { |
| 909 | if a.isValidIntegerIndex(idx) { |
| 910 | a.val.runtime.typeErrorResult(throw, "Cannot delete property '%d' of %s", idx, a.val.String()) |
| 911 | return false |
| 912 | } |
| 913 | return true |
| 914 | } |
| 915 | if idx == 0 { |
| 916 | return true |
| 917 | } |
| 918 | return a.baseObject.deleteStr(name, throw) |
| 919 | } |
| 920 | |
| 921 | func (a *typedArrayObject) deleteIdx(idx valueInt, throw bool) bool { |
| 922 | if a.viewedArrayBuf.ensureNotDetached(false) && idx >= 0 && int64(idx) < int64(a.length) { |
nothing calls this directly
no test coverage detected