Host APIs¶
Installable host-side APIs for browser-like globals and V8 embedder features.
HostAPI
¶
Base class for host-side APIs that can be installed into a BaseProfile.
Timer
¶
MicrotaskQueue
¶
ModuleLoader
¶
Bases: HostAPI
Installs host-backed static and dynamic ECMAScript module resolution.
__new__(resolver: Mapping[str, str | Module] | Callable[[str, str | None, dict[str, str]], str | Module | None] | None = None, *, import_meta: Mapping[str, object] | Callable[[str], Mapping[str, object] | None] | None = None) -> ModuleLoader
¶
Create a module loader from a mapping or resolver callback.
PromiseRejectionTracker
¶
Console
¶
DynamicCodePolicy
¶
WebAssembly
¶
Bases: HostAPI
Installs WebAssembly streaming helpers and configures Wasm code generation.
allow_code_generation: bool
property
¶
Return whether WebAssembly code generation is allowed.
cache: WasmModuleCache | None
property
¶
Return the optional compiled Wasm module cache.
loader: _WebAssemblyLoaderLike | None
property
¶
Return the Python streaming loader, if one was configured.
__new__(loader: _WebAssemblyLoaderLike | None = None, *, allow_code_generation: bool = True, cache: WasmModuleCache | None = None) -> WebAssembly
¶
Create a WebAssembly HostAPI configuration.
SharedArrayBuffer
¶
Atomics
¶
ShadowRealm
¶
Inspector
¶
Bases: HostAPI
Installs V8 Inspector support for a context.
aux_data: str | None
property
¶
Return auxiliary inspector context data.
context_group_id: int
property
¶
Return the inspector context group id.
name: str
property
¶
Return the inspector context name.
__new__(name: str = 'v8-python', *, context_group_id: int = 1, aux_data: str | None = None) -> Inspector
¶
Create an Inspector HostAPI configuration.