Crate script_traits
source ·Expand description
This module contains traits in script used generically in the rest of Servo. The traits are here instead of in script so that these modules won’t have to depend on script.
Modules§
- This module contains implementations in script that are serializable, as per https://html.spec.whatwg.org/multipage/#serializable-objects. The implementations are here instead of in script so that the other modules involved in the serialization don’t have to depend on script.
- This module contains implementations in script that are transferable. The implementations are here instead of in script so that the other modules involved in the transfer don’t have to depend on script.
Structs§
- Specifies if rAF should be triggered and/or CSS Animations and Transitions.
- Specifies the information required to load an auxiliary browsing context.
- Message for communication between the constellation and a global managing broadcast channels.
- Message that gets passed to service worker scope on postMessage
- The result of executing paint code: the image together with any image URLs that need to be loaded.
- Index of gamepad in list of system’s connected gamepads
- The minimum and maximum values that can be reported for axis or button input from this gamepad
- The haptic effects supported by this gamepad
- Specifies the information required to load an iframe.
- Specifies the information required to load a URL in an iframe.
- An iframe sizing operation.
- Data needed to construct a script thread.
- can be passed to
LoadUrl
to load a page with GET/POST parameters or headers - The initial data required to create a new layout attached to an existing script thread.
- Channels to allow service worker manager to communicate with constellation and resource thread
- Entities required to spawn service workers
- A Script to Constellation channel.
- The scroll state of a stacking context.
- A data-holder for serialized data and transferred objects. https://html.spec.whatwg.org/multipage/#structuredserializewithtransfer
- Notifies the script thread to fire due timers.
TimerSource
must beFromWindow
when dispatched toScriptThread
and must beFromWorker
when dispatched to aDedicatedGlobalWorkerScope
- The id to be used for a
TimerEvent
is defined by the correspondingTimerEventRequest
. - Requests a TimerEvent-Message be sent after the given duration.
- The message used to send a request to the timer scheduler.
- An opaque identifier for a touch point.
- The address of a node. Layout sends these back. They must be validated via
from_untrusted_node_address
before they can be used, because we do not trust layout. - The Wheel event deltas in every direction
- Data about the window size.
- Resources required by workerglobalscopes
- Common entities representing a network load origin
Enums§
- For a given pipeline, whether any animations are currently running and any animation callbacks are queued
- Events from the compositor that the script thread needs to know about
- Messages sent from the constellation or layout to the script thread.
- When a pipeline is closed, should its browsing context be discarded too?
- Is a document fully active, active or inactive? A document is active if it is the current active document in its session history, it is fuly active if it is active and all of its ancestors are active, and it is inactive otherwise.
- Used to determine if a script has any pending asynchronous activity.
- Whether a DOM event was prevented by web content
- The type of Gamepad event
- The type of Gamepad input being updated
- Whether the sandbox attribute is present for an iframe element
- The kind of error the job promise should be rejected with.
- Messages sent from Job algorithms steps running in the SW manager, in order to resolve or reject the job promise.
- Jobs are resolved with the help of various values.
- The result of evaluating a javascript scheme url.
- Messages from the layout to the constellation.
- The origin where a given load was initiated. Useful for origin checks, for example before evaluation a JS URL.
- A log entry reported to the constellation We don’t report all log entries, just serious ones. We need a separate type for this because
LogLevel
isn’t serializable. - The type of MediaSession action. https://w3c.github.io/mediasession/#enumdef-mediasessionaction
- Messages for communication between the constellation and a global managing ports.
- The mouse button involved in the event.
- The types of mouse events
- Errors from executing a paint worklet
- Type of recorded progressive web metric
- Messages outgoing from the Service Worker Manager thread to constellation
- Messages from the script to the constellation.
- Messages sent to Service Worker Manager thread
- The type of platform theme.
- Describes the thread that requested the TimerEvent.
- The type of input represented by a multi-touch event.
- The direction of a history traversal
- The reason why the pipeline id of an iframe is being updated.
- Messages to the constellation originating from the WebDriver server.
- Mode to measure WheelDelta floats in
- The type of window size change.
Traits§
- Execute paint code in the worklet thread pool.
- This trait allows creating a
ServiceWorkerManager
without depending on thescript
crate.