MCPcopy Create free account
hub / github.com/buke/quickjs-go / Prototype

Method Prototype

value.go:754–759  ·  view source on GitHub ↗

Prototype returns the object's prototype value.

()

Source from the content-addressed store, hash-verified

752
753// Prototype returns the object's prototype value.
754func (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.
762func (v *Value) SetPrototype(proto *Value) bool {

Calls 1

isAliveMethod · 0.95