DeleteIdx deletes the property with the given index.
(idx uint32)
| 580 | |
| 581 | // DeleteIdx deletes the property with the given index. |
| 582 | func (v *Value) DeleteIdx(idx uint32) bool { |
| 583 | if !v.HasIdx(idx) { |
| 584 | return false // Property does not exist, nothing to delete |
| 585 | } |
| 586 | return C.JS_DeletePropertyInt64(v.ctx.ref, v.ref, C.int64_t(idx), C.int(1)) == 1 |
| 587 | } |
| 588 | |
| 589 | // DefineProperty defines a property using a full descriptor. |
| 590 | func (v *Value) DefineProperty(name string, desc PropertyDescriptor) bool { |