SetPrototype sets the object's prototype.
(proto *Value)
| 760 | |
| 761 | // SetPrototype sets the object's prototype. |
| 762 | func (v *Value) SetPrototype(proto *Value) bool { |
| 763 | if !v.isAlive() || !proto.belongsTo(v.ctx) { |
| 764 | return false |
| 765 | } |
| 766 | return C.JS_SetPrototype(v.ctx.ref, v.ref, proto.ref) == 1 |
| 767 | } |
| 768 | |
| 769 | // IsExtensible returns true if new properties can still be added. |
| 770 | func (v *Value) IsExtensible() bool { |