browser

package
v1.0.7 Latest Latest
Warning

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

Go to latest
Published: Oct 18, 2026 License: Apache-2.0 Imports: 27 Imported by: 0 modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Overview

Package browser launches LLGo WebAssembly debug sessions in Chromium.

Index

Constants

View Source
const MinimumChromeMajor = 123

Variables

This section is empty.

Functions

func Find

func Find(configured string) (string, int, error)

Find resolves and validates a Chromium-family executable.

func Run

func Run(artifact string, options Options, stdin io.Reader, stdout, stderr io.Writer) error

Run validates artifact, starts a loopback-only debug server, installs the LLGo extension in an isolated profile, and waits for Chromium to exit.

Types

type Options

type Options struct {
	Chrome       string
	ChromeArgs   []string
	SourceMaps   []browserdebug.PathMapping
	SourceRoots  []string
	KeepProfile  bool
	ProfilePath  string
	DisableTools bool
}

type Session

type Session struct {
	URL      string
	Listener net.Listener
	Server   *http.Server
	Bundle   *browserdebug.Bundle
	// contains filtered or unexported fields
}

func StartSession

func StartSession(artifact string, mappings []browserdebug.PathMapping, sourceRoots ...string) (*Session, error)

StartSession starts the loopback HTTP portion of a browser debug session. It is exported so headless acceptance tests can exercise exactly the same artifact, sidecar, source, schema, and page routes as the interactive path.

func (*Session) Close

func (s *Session) Close() error

func (*Session) PluginReady

func (s *Session) PluginReady() uint64

PluginReady reports how often Chrome's Language Extension completed all module, index, build-identity, and debugger-schema validation.

func (*Session) PluginRequests

func (s *Session) PluginRequests() uint64

PluginRequests reports how often Chrome's Language Extension requested the session index. PluginReady is the stronger end-to-end readiness signal.

func (*Session) RuntimeReady

func (s *Session) RuntimeReady() uint64

RuntimeReady reports how often the inspected page completed WebAssembly instantiation. It is independent of whether DevTools or the extension ran.

func (*Session) WriteExtension

func (s *Session) WriteExtension(directory string) error

WriteExtension materializes the embedded unpacked extension.

Jump to

Keyboard shortcuts

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