steamcef

package
v0.6.0 Latest Latest
Warning

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

Go to latest
Published: Jun 1, 2026 License: GPL-3.0 Imports: 14 Imported by: 0

Documentation

Index

Constants

View Source
const DefaultInjectTab = "SharedJSContext"

Variables

View Source
var ErrCEFEncodeResultFailed = errors.New("failed to encode CEF execution result")
View Source
var ErrCEFJavaScriptException = errors.New("javascript exception in CEF execution")
View Source
var ErrCEFMalformedResponse = errors.New("malformed CEF response")
View Source
var ErrCEFMissingRuntimeResult = errors.New("missing runtime result in CEF response")
View Source
var ErrCEFMissingRuntimeValue = errors.New("missing runtime value in CEF response")
View Source
var ErrCEFProtocolResponseError = errors.New("CEF protocol response error")
View Source
var ErrCEFRemoteDebugUnreachable = errors.New("CEF remote debug websocket unreachable")
View Source
var ErrCEFResponseReadFailed = errors.New("failed to read CEF websocket response")
View Source
var ErrCEFTabNotFound = errors.New("CEF tab not found")
View Source
var ErrCEFTemplateExecFailed = errors.New("failed to execute JS template")
View Source
var ErrFailedToExecuteJs = errors.New("failed to execute JS in CEF")

Functions

func NextInjectID

func NextInjectID() int

Types

type ExecutePayload

type ExecutePayload struct {
	ID     int                  `json:"id"`
	Method string               `json:"method"`
	Params ExecutePayloadParams `json:"params"`
}

func NewExecutePayload

func NewExecutePayload(js string) ExecutePayload

type ExecutePayloadParams

type ExecutePayloadParams struct {
	Expression    string `json:"expression"`
	ReturnByValue bool   `json:"returnByValue"`
	AwaitPromise  bool   `json:"awaitPromise"`
}

type Executor

type Executor[Args any, R any] interface {
	Execute(ctx context.Context, args Args) (R, error)
	ExecuteInTab(ctx context.Context, tab string, args Args) (R, error)
}

func NewExecutor

func NewExecutor[Args any, R any](cfg *config.Steam, tmpl *template.Template) Executor[Args, R]

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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