isolated

package
v0.14.0 Latest Latest
Warning

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

Go to latest
Published: Aug 26, 2026 License: MIT Imports: 28 Imported by: 0

Documentation

Overview

Package isolated runs Growse page runtimes behind a bounded child-process protocol. The browser remains the sole owner of DOM, network, storage, and navigation policy.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func AcquireAuxiliaryWorkerSlot

func AcquireAuxiliaryWorkerSlot() bool

AcquireAuxiliaryWorkerSlot reserves one process from the Browser Session worker budget shared with page and frame runtimes.

func ApplyAuxiliaryWorkerSandbox

func ApplyAuxiliaryWorkerSandbox() ([]string, error)

ApplyAuxiliaryWorkerSandbox applies and verifies the child-side platform restrictions used by page Runtime workers.

func ConfigureAuxiliaryWorkerCommand

func ConfigureAuxiliaryWorkerCommand(command *exec.Cmd) error

ConfigureAuxiliaryWorkerCommand applies the same parent-side process containment used by page Runtime workers.

func ReleaseAuxiliaryWorkerSlot

func ReleaseAuxiliaryWorkerSlot()

ReleaseAuxiliaryWorkerSlot returns a previously acquired process slot.

Types

type Runtime

type Runtime struct {
	// contains filtered or unexported fields
}

Runtime is a browser-side proxy for one isolated Go or JavaScript runtime.

func New

func New(engine runtimemodel.Engine) *Runtime

New returns a runtime proxy for engine. The worker is started by Load.

func (*Runtime) DispatchDOMEvent

func (r *Runtime) DispatchDOMEvent(event events.Event) bool

DispatchDOMEvent synchronizes current browser DOM state and invokes worker listeners.

func (*Runtime) DispatchHashChange

func (r *Runtime) DispatchHashChange(oldURL, newURL string)

func (*Runtime) DispatchMessage

func (r *Runtime) DispatchMessage(event runtimemodel.MessageEvent) error

DispatchMessage delivers a bounded postMessage event to the worker queue.

func (*Runtime) DispatchPageEvent

func (r *Runtime) DispatchPageEvent(callback func() bool) bool

DispatchPageEvent preserves the Runtime interface used by serialized browser inspection.

func (*Runtime) DispatchPopState

func (r *Runtime) DispatchPopState(state string)

func (*Runtime) HasAnimationFrameCallbacks

func (r *Runtime) HasAnimationFrameCallbacks() bool

func (*Runtime) Load

func (r *Runtime) Load(ctx context.Context, scripts []runtimemodel.Script, environment runtimemodel.Environment) error

func (*Runtime) RunAnimationFrame

func (r *Runtime) RunAnimationFrame(current time.Time) bool

func (*Runtime) SandboxStatus

func (r *Runtime) SandboxStatus() runtimemodel.SandboxStatus

SandboxStatus returns the last verified worker capability report.

func (*Runtime) SetBackground

func (r *Runtime) SetBackground(background bool)

func (*Runtime) Start

func (r *Runtime) Start(ctx context.Context) error

func (*Runtime) Stop

func (r *Runtime) Stop() error

func (*Runtime) UpdateFrames

func (r *Runtime) UpdateFrames(frames []runtimemodel.FrameAccess)

UpdateFrames replaces generation-scoped child access inside the worker.

func (*Runtime) UpdateLocation

func (r *Runtime) UpdateLocation(location *url.URL)

func (*Runtime) UpdateWindow

func (r *Runtime) UpdateWindow(window runtimemodel.WindowContext)

UpdateWindow refreshes generation-scoped WindowProxy relationships in the worker.

Jump to

Keyboard shortcuts

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