Prototype returns the object's prototype value.
()
| 752 | |
| 753 | // Prototype returns the object's prototype value. |
| 754 | func (v *Value) Prototype() *Value { |
| 755 | if !v.isAlive() { |
| 756 | return nil |
| 757 | } |
| 758 | return &Value{ctx: v.ctx, ref: C.JS_GetPrototype(v.ctx.ref, v.ref)} |
| 759 | } |
| 760 | |
| 761 | // SetPrototype sets the object's prototype. |
| 762 | func (v *Value) SetPrototype(proto *Value) bool { |