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 ¶
- func AcquireAuxiliaryWorkerSlot() bool
- func ApplyAuxiliaryWorkerSandbox() ([]string, error)
- func ConfigureAuxiliaryWorkerCommand(command *exec.Cmd) error
- func ReleaseAuxiliaryWorkerSlot()
- type Runtime
- func (r *Runtime) DispatchDOMEvent(event events.Event) bool
- func (r *Runtime) DispatchHashChange(oldURL, newURL string)
- func (r *Runtime) DispatchMessage(event runtimemodel.MessageEvent) error
- func (r *Runtime) DispatchPageEvent(callback func() bool) bool
- func (r *Runtime) DispatchPopState(state string)
- func (r *Runtime) HasAnimationFrameCallbacks() bool
- func (r *Runtime) Load(ctx context.Context, scripts []runtimemodel.Script, ...) error
- func (r *Runtime) RunAnimationFrame(current time.Time) bool
- func (r *Runtime) SandboxStatus() runtimemodel.SandboxStatus
- func (r *Runtime) SetBackground(background bool)
- func (r *Runtime) Start(ctx context.Context) error
- func (r *Runtime) Stop() error
- func (r *Runtime) UpdateFrames(frames []runtimemodel.FrameAccess)
- func (r *Runtime) UpdateLocation(location *url.URL)
- func (r *Runtime) UpdateMediaEnvironment(media runtimemodel.MediaEnvironment)
- func (r *Runtime) UpdateWindow(window runtimemodel.WindowContext)
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 ¶
ApplyAuxiliaryWorkerSandbox applies and verifies the child-side platform restrictions used by page Runtime workers.
func ConfigureAuxiliaryWorkerCommand ¶
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 ¶
DispatchDOMEvent synchronizes current browser DOM state and invokes worker listeners.
func (*Runtime) DispatchHashChange ¶
func (*Runtime) DispatchMessage ¶
func (r *Runtime) DispatchMessage(event runtimemodel.MessageEvent) error
DispatchMessage delivers a bounded postMessage event to the worker queue.
func (*Runtime) DispatchPageEvent ¶
DispatchPageEvent preserves the Runtime interface used by serialized browser inspection.
func (*Runtime) DispatchPopState ¶
func (*Runtime) HasAnimationFrameCallbacks ¶
func (*Runtime) Load ¶
func (r *Runtime) Load(ctx context.Context, scripts []runtimemodel.Script, environment runtimemodel.Environment) error
func (*Runtime) SandboxStatus ¶
func (r *Runtime) SandboxStatus() runtimemodel.SandboxStatus
SandboxStatus returns the last verified worker capability report.
func (*Runtime) SetBackground ¶
func (*Runtime) UpdateFrames ¶
func (r *Runtime) UpdateFrames(frames []runtimemodel.FrameAccess)
UpdateFrames replaces generation-scoped child access inside the worker.
func (*Runtime) UpdateLocation ¶
func (*Runtime) UpdateMediaEnvironment ¶ added in v0.15.0
func (r *Runtime) UpdateMediaEnvironment(media runtimemodel.MediaEnvironment)
UpdateMediaEnvironment forwards browser-owned media changes to the Page worker.
func (*Runtime) UpdateWindow ¶
func (r *Runtime) UpdateWindow(window runtimemodel.WindowContext)
UpdateWindow refreshes generation-scoped WindowProxy relationships in the worker.