update
This commit is contained in:
+3
-3
@@ -157,9 +157,9 @@ func init123() {
|
|||||||
return v
|
return v
|
||||||
}
|
}
|
||||||
vm := otto.New()
|
vm := otto.New()
|
||||||
vm.Set("call", func(call otto.FunctionCall) otto.Value {
|
vm.Set("call", func(name otto.Value, arg otto.Value) interface{} {
|
||||||
key := call.Argument(0).String()
|
key := name.String()
|
||||||
value := call.Argument(1).String()
|
value := arg.String()
|
||||||
if f, ok := OttoFuncs[key]; ok {
|
if f, ok := OttoFuncs[key]; ok {
|
||||||
v, _ := otto.ToValue(f(value))
|
v, _ := otto.ToValue(f(value))
|
||||||
return v
|
return v
|
||||||
|
|||||||
Reference in New Issue
Block a user