Expand description
The script crate contains all matters DOM.
ModulesΒ§
- animation_
timeline π - A timeline module, used to specify an
AnimationTimeline
which determines the time used for synchronizing animations in the script thread. - animations π
- The set of animations for a document.
- body π
- canvas_
context π - Common interfaces for Canvas Contexts
- canvas_
state π - clipboard_
provider π - conversions π
- devtools π
- document_
collection π - document_
loader π - Tracking of pending loads in a document.
- dom π
- The implementation of the DOM.
- drag_
data_ πstore - fetch π
- iframe_
collection π - image_
animation π - indexed_
db π - init π
- layout_
dom - A safe wrapper for DOM nodes that prevents layout from mutating the DOM, from letting DOM nodes escape, and from generally doing anything that it isnβt supposed to. This is accomplished via a simple whitelist of allowed operations, along with some lifetime magic to prevent nodes from escaping.
- layout_
image π - Infrastructure to initiate network requests for images needed by layout. The script thread needs to be responsible for them because thereβs no guarantee that the responsible nodes will still exist in the future if layout holds on to them during asynchronous operations.
- links π
- Defines shared hyperlink behaviour for
<link>
,<a>
,<area>
and<form>
elements. - messaging π
- microtask π
- Implementation of microtasks and microtask queues. It is up to implementations of event loops to store a queue and perform checkpoints at appropriate times, as well as enqueue microtasks as required.
- mime π
- navigation π
- The listener that encapsulates all state for an in-progress document request. Any redirects that are encountered are followed. Whenever a non-redirect response is received, it is forwarded to the appropriate script thread.
- network_
listener π - realms π
- routed_
promise π - script_
module π - The script module mod contains common traits and structs
related to
type=module
for script thread or worker threads. - script_
runtime π - The script runtime contains common traits and structs commonly used by the script thread, the dom, and the worker threads.
- script_
thread π - The script thread is the thread that owns the DOM in memory, runs JavaScript, and triggers layout. Itβs in charge of processing events for all same-origin pages in a frame tree, and manages the entire lifetime of pages in the frame tree from initial request to teardown.
- security_
manager π - serviceworker_
manager π - The service worker manager persists the descriptor of any registered service workers. It also stores an active workers map, which holds descriptors of running service workers. If an active service worker timeouts, then it removes the descriptor entry from its active_workers map
- stylesheet_
loader π - stylesheet_
set π - task π
- Machinery for tasks.
- task_
manager π - task_
queue π - Machinery for task-queue.
- task_
source π - test
- textinput
- Common handling of keyboard input and state management for text input controls
- timers π
- unminify π
- webdriver_
handlers π - window_
named_ πproperties - xpath π
MacrosΒ§
- make_
atomic_ setter - make_
bool_ getter - make_
bool_ setter - make_
clamped_ uint_ setter - make_
dimension_ setter - make_
form_ action_ getter - make_
getter - make_
int_ getter - make_
int_ setter - make_
labels_ getter - make_
legacy_ color_ setter - make_
limited_ int_ setter - make_
limited_ uint_ setter - make_
nonzero_ dimension_ setter - make_
setter - make_
uint_ getter - make_
uint_ setter - make_
url_ getter - make_
url_ setter - maplike
- Usage:
- native_
fn - Defines a macro
native_fn!
to create a JavaScript function from a Rust function pointer. - native_
raw_ obj_ fn - Defines a macro
native_raw_obj_fn!
to create a raw JavaScript function object. - setlike
- Usage:
StructsΒ§
- JSEngine
Setup - Script
Thread - Service
Worker Manager - A structure managing all registrations and workers for a given origin.