// jsRuntime returns a new JavaScript runtime, with some useful global
// variables and functions defined.
jsRuntime returns a new JavaScript runtime, with some useful global
variables and functions defined.
// jsRuntime returns a new JavaScript runtime with some useful global // variables and functions defined .
func jsRuntime() *goja.Runtime {
	rt := goja.New()
	rt.Set("lookupHost", lookupHost)
	rt.Set("httpClient", new(http.Client))
	rt.Set("copyBody", copyBody)
	new(require.Registry).Enable(rt)
	console.Enable(rt)
	return rt
}
func jsRuntime ( ) * goja . Runtime { rt := goja . New ( ) rt . Set ( " " , lookupHost ) rt . Set ( " " , new ( http . Client ) ) rt . Set ( " " , copyBody ) new ( require . Registry ) . Enable ( rt ) console . Enable ( rt ) return rt }
jsRuntime returns a new JavaScript runtime, with some useful global
variables and functions defined.
jsRuntime returns a new JavaScript runtime with some useful global variables and functions defined .