Skip to main content

Module js

Module js 

Source
Expand description

Minimal JS runtime backed by pixi_byte.

Installs a small set of DOM bindings (console, document.getElementById, element properties). The engine never imports platform; DOM access goes through the shared host slot that JsRuntime registers on the VM. The runtime normally lives on a background thread (see processor), owning a private mirror of the DOM that is synced with the UI thread via DomSnapshot commits. It can also be used directly on any thread.

Re-exports§

pub use devtools::JsDevToolsRequest;
pub use processor::JsProcessor;
pub use processor::JsTask;
pub use processor::JsTaskResult;

Modules§

devtools
DevTools bridge for page JavaScript.
processor
Runs the page’s JavaScript runtime on a dedicated background thread.

Structs§

IframeContentSnapshot
The serialized content document of a single <iframe>, carried from the JS thread so the layout can render it nested inside the host page.
JsFetchRequest
A fetch request waiting to be dispatched by the browser network layer.
JsFetchResponse
The response data exposed to a JavaScript Response object.
JsHost
State shared between the JS natives and the browser side.
JsIframeFetchRequest
An <iframe src="..."> whose content has to be fetched and parsed.
JsLayoutMetrics
Geometry produced by the committed layout tree for a live DOM element.
JsRuntime
A JS engine instance with DOM bindings installed.