Browse Source

runtime in script

0x4a52466c696e74 2 years ago
parent
commit
31c82a5dbc
1 changed files with 2 additions and 0 deletions
  1. 2 0
      mjs.go

+ 2 - 0
mjs.go

@@ -128,6 +128,8 @@ func (s *Mjs) Exec(name string, data map[string]interface{}) (modified int64, er
 		return nil
 	}
 
+	vm.Set("runtime", vm)
+
 	vm.Set("log", func(vals ...interface{}) {
 		log.Println(vals...)
 	})