Run runs code with this VM. Run can NOT be executed concurrency
(ctx context.Context, code any)
| 94 | |
| 95 | // Run runs code with this VM. Run can NOT be executed concurrency |
| 96 | func (v *VM) Run(ctx context.Context, code any) (*Value, error) { |
| 97 | return wrapVmRun(ctx, v, func() (otto.Value, error) { |
| 98 | return v.o.Run(code) |
| 99 | }) |
| 100 | } |
| 101 | |
| 102 | // Call calls function with this VM. Call can NOT be executed concurrency |
| 103 | func (v *VM) Call(ctx context.Context, fn string, args ...any) (value *Value, e error) { |