Crate script

Source
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Β§

JSEngineSetup
ScriptThread
ServiceWorkerManager
A structure managing all registrations and workers for a given origin.

FunctionsΒ§

init