jsrunner

package
v0.6.9 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Feb 5, 2025 License: MPL-2.0 Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Engine

type Engine int
const (
	Goja Engine = iota
	Native
)

type JSObject

type JSObject interface {
	JSValue
}

type JSRunner

type JSRunner interface {
	RunString(code string) (JSValue, error)
	NewObject() JSObject
	Set(name string, value interface{}) error
	WaitPromise(ctx context.Context, val JSValue) (interface{}, error)
	Engine() Engine
	MustGet(string) (JSValue, error)
}

func NewJSRunner

func NewJSRunner() JSRunner

type JSValue

type JSValue interface {
	String() string
	Export() interface{}
}

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL