Skip to main content

Crate bao_browser

Crate bao_browser 

Source

Structs§

AutoCloseWorker
RAII guard that terminates a Worker when dropped.
BaoConfig
BaoRuntime
BaoServoDelegate
BaoWebViewDelegate
BaoWebViewState
BaoWsRegistry
WS command-face registry: bridges CdpServer sessions to the real bao_cdp command dispatch.
BridgeChannel
Producer half of the bridge command channel.
BridgeReceiver
Receiving end of a BridgeChannel.
BrowserConfig
DedicatedWorkerGlobalScopeState
The DedicatedWorkerGlobalScope state tracked by bao_browser.
EvaluateResult
Result of evaluating a script in the Node Realm.
PageConfig
PageHandle
PagePool
Permission
PermissionDenied
PermissionGuard
RuntimeBridge
High-level bridge that owns a BridgeChannel and provides the public command API for the bao_browser runtime.
ServiceWorkerFetchEvent
A ServiceWorker fetch interception event observed by the bao layer.
ServiceWorkerGlobalScopeState
A ServiceWorkerGlobalScope state tracked by bao_browser.
ServiceWorkerHandle
A Send+Sync handle to a ServiceWorker’s lifecycle state.
ServiceWorkerRegistrationId
Unique identifier for a ServiceWorker registration, keyed by (script_url, scope).
ServiceWorkerRegistrationTracking
The state of a ServiceWorker registration as tracked by bao_browser.
ServiceWorkerScopeConfig
Configuration for initializing a ServiceWorker’s ServiceWorkerGlobalScope with stealth-consistent properties from the registering page.
SharedWorkerChannelBridge
Aggregated channel bridge for a SharedWorker across all connected pages.
SharedWorkerConnectEvent
A SharedWorker connect event observed by the bao layer.
SharedWorkerGlobalScopeState
The SharedWorkerGlobalScope state tracked by bao_browser.
SharedWorkerHandle
A Send+Sync handle to a servo SharedWorker’s lifecycle state.
SharedWorkerId
Unique identifier for a SharedWorker, keyed by (script_url, name).
SharedWorkerPortChannel
A per-page MessagePort channel for a SharedWorker.
SharedWorkerPortEndpoints
Worker-thread endpoints for a SharedWorker port channel.
SharedWorkerPortRef
Per-page reference to a SharedWorker’s MessagePort.
SharedWorkerScopeConfig
Configuration for initializing a SharedWorker’s SharedWorkerGlobalScope with stealth-consistent properties from the first connecting page.
StructuredClonePayload
A structured-clone serialized payload for Worker postMessage.
WorkerChannelBridge
Bidirectional channel bridge for a single Worker’s postMessage channel.
WorkerChannelEndpoints
Channel endpoints sent to the Worker thread.
WorkerErrorEvent
A Worker error event observed by the bao layer.
WorkerGlobalScopeState
The base Worker global scope state tracked by bao_browser.
WorkerHandle
A Send+Sync handle to a servo Worker’s lifecycle state.
WorkerId
Unique identifier for a Worker within a page’s scope. @trace REQ-BRW-004 [entity:Worker]
WorkerLocation
Represents the Worker’s location object (self.location).
WorkerMessageEvent
A Worker postMessage event observed by the bao layer.
WorkerNavigator
Represents the Worker’s navigator object (self.navigator).
WorkerNetworkInformation
Network information for WorkerNavigator.connection.
WorkerScopeConfig
Configuration for initializing a Worker’s DedicatedWorkerGlobalScope with stealth-consistent properties from the parent page.
WorkerScriptLoadResult
Result of loading a Worker script.
WorkerScriptLoader
Worker script loader — handles URL-based script fetching for Workers.
WorkerStructuredMessage
A structured-clone message crossing the page↔worker boundary.
WorkerTeardownResult
Result of a crash-safe Worker teardown operation.

Enums§

BridgeCommand
Commands sent through the runtime bridge for execution in a page context.
BridgeResponse
Response returned after executing a BridgeCommand.
BrowserError
PageState
ScreenshotFormat
ServiceWorkerFetchInterceptMode
The fetch interception mode for a ServiceWorker.
ServiceWorkerRegistrationState
Lifecycle state of a ServiceWorker registration.
WorkerLifecycleState
The lifecycle state of a Worker, tracked for CDP observability and crash-safe teardown verification.
WorkerMessageDirection
Direction of a Worker postMessage event.
WorkerScriptLoadError
Error from loading a Worker script.
WorkerScriptLoadState
Used for CDP observability and lifecycle management. The Worker script loading process has these states:
WorkerScriptSource
Source of a Worker script — either inline (data:/blob:/string) or URL-based.
WorkerScriptType
Script type for Worker compilation.
WorkerTeardownPath
Which teardown path triggered the Worker’s termination.

Functions§

crash_safe_teardown_worker
Perform crash-safe teardown for a single Worker.
encode_image
handle_bridge_command
Process a single bridge command by dispatching to the appropriate page in the pool.
is_javascript_mime_type
Check if a MIME type is a valid JavaScript MIME type for Worker scripts.
register_worker_scope_callback_native
Register a servo-native Worker scope callback via the vendor patch servo::register_worker_scope_callback (DEC-WK-001 / TASK-1).
run_browser

Type Aliases§

WorkerScopeInitFn
Type alias for the Worker scope initialization callback.