Browse Source

Make class name a public field of Object

Guillaume Ballet 6 years ago
parent
commit
cc13d3ec34
1 changed files with 5 additions and 0 deletions
  1. 5 0
      value.go

+ 5 - 0
value.go

@@ -765,6 +765,11 @@ func (o *Object) MarshalJSON() ([]byte, error) {
 	return ctx.buf.Bytes(), nil
 	return ctx.buf.Bytes(), nil
 }
 }
 
 
+// ClassName returns the class name
+func (o *Object) ClassName() string {
+	return o.self.className()
+}
+
 func (o valueUnresolved) throw() {
 func (o valueUnresolved) throw() {
 	o.r.throwReferenceError(o.ref)
 	o.r.throwReferenceError(o.ref)
 }
 }