فهرست منبع

Added Runtime.GlobalObject()

Dmitry Panov 8 سال پیش
والد
کامیت
2222b0a497
1فایلهای تغییر یافته به همراه5 افزوده شده و 0 حذف شده
  1. 5 0
      runtime.go

+ 5 - 0
runtime.go

@@ -1234,6 +1234,11 @@ func (r *Runtime) ExportTo(v Value, target interface{}) error {
 	return nil
 	return nil
 }
 }
 
 
+// GlobalObject returns the global object.
+func (r *Runtime) GlobalObject() *Object {
+	return r.globalObject
+}
+
 // Set the specified value as a property of the global object.
 // Set the specified value as a property of the global object.
 // The value is first converted using ToValue()
 // The value is first converted using ToValue()
 func (r *Runtime) Set(name string, value interface{}) {
 func (r *Runtime) Set(name string, value interface{}) {