IsExtensible returns true if new properties can still be added.
()
| 768 | |
| 769 | // IsExtensible returns true if new properties can still be added. |
| 770 | func (v *Value) IsExtensible() bool { |
| 771 | if !v.isAlive() { |
| 772 | return false |
| 773 | } |
| 774 | ret := C.JS_IsExtensible(v.ctx.ref, v.ref) |
| 775 | if ret < 0 { |
| 776 | return false |
| 777 | } |
| 778 | return ret == 1 |
| 779 | } |
| 780 | |
| 781 | // PreventExtensions marks object as non-extensible. |
| 782 | func (v *Value) PreventExtensions() bool { |