Documentation
¶
Overview ¶
Package browser launches LLGo WebAssembly debug sessions in Chromium.
Index ¶
- Constants
- func Find(configured string) (string, int, error)
- func Run(artifact string, options Options, stdin io.Reader, stdout, stderr io.Writer) error
- type Options
- type Session
- func (s *Session) Close() error
- func (s *Session) PluginReady() uint64
- func (s *Session) PluginRequests() uint64
- func (s *Session) RuntimeReady() uint64
- func (s *Session) StartWorkerControl(ctx context.Context, profile string)
- func (s *Session) WorkerState() workerSnapshot
- func (s *Session) WriteExtension(directory string) error
Constants ¶
const MinimumChromeMajor = 123
Variables ¶
This section is empty.
Functions ¶
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) PluginReady ¶
PluginReady reports how often Chrome's Language Extension completed all module, index, build-identity, and debugger-schema validation.
func (*Session) PluginRequests ¶
PluginRequests reports how often Chrome's Language Extension requested the session index. PluginReady is the stronger end-to-end readiness signal.
func (*Session) RuntimeReady ¶
RuntimeReady reports how often the inspected page completed WebAssembly instantiation. It is independent of whether DevTools or the extension ran.
func (*Session) StartWorkerControl ¶ added in v1.0.9
StartWorkerControl attaches only to this session's page and its descendant workers. A separate CDP client can coexist with the DevTools frontend.
func (*Session) WorkerState ¶ added in v1.0.9
func (s *Session) WorkerState() workerSnapshot
func (*Session) WriteExtension ¶
WriteExtension materializes the embedded unpacked extension.