mirror of
https://github.com/servo/servo.git
synced 2025-08-05 05:30:08 +01:00
Improve the documentation for ScriptMsg.
This commit is contained in:
parent
96aad42a5d
commit
034e815657
1 changed files with 14 additions and 8 deletions
|
@ -64,21 +64,27 @@ use std::rc::Rc;
|
||||||
|
|
||||||
local_data_key!(pub StackRoots: *const RootCollection)
|
local_data_key!(pub StackRoots: *const RootCollection)
|
||||||
|
|
||||||
/// Messages used to control the script task.
|
/// Messages used to control script event loops, such as ScriptTask and
|
||||||
|
/// DedicatedWorkerGlobalScope.
|
||||||
pub enum ScriptMsg {
|
pub enum ScriptMsg {
|
||||||
/// Acts on a fragment URL load on the specified pipeline.
|
/// Acts on a fragment URL load on the specified pipeline (only dispatched
|
||||||
|
/// to ScriptTask).
|
||||||
TriggerFragmentMsg(PipelineId, Url),
|
TriggerFragmentMsg(PipelineId, Url),
|
||||||
/// Begins a content-initiated load on the specified pipeline.
|
/// Begins a content-initiated load on the specified pipeline (only
|
||||||
|
/// dispatched to ScriptTask).
|
||||||
TriggerLoadMsg(PipelineId, Url),
|
TriggerLoadMsg(PipelineId, Url),
|
||||||
/// Instructs the script task to send a navigate message to the constellation.
|
/// Instructs the script task to send a navigate message to
|
||||||
|
/// the constellation (only dispatched to ScriptTask).
|
||||||
NavigateMsg(NavigationDirection),
|
NavigateMsg(NavigationDirection),
|
||||||
/// Fires a JavaScript timeout.
|
/// Fires a JavaScript timeout (only dispatched to ScriptTask).
|
||||||
FireTimerMsg(PipelineId, TimerId),
|
FireTimerMsg(PipelineId, TimerId),
|
||||||
/// Notifies the script that a window associated with a particular pipeline should be closed.
|
/// Notifies the script that a window associated with a particular pipeline
|
||||||
|
/// should be closed (only dispatched to ScriptTask).
|
||||||
ExitWindowMsg(PipelineId),
|
ExitWindowMsg(PipelineId),
|
||||||
/// Notifies the script of progress on a fetch
|
/// Notifies the script of progress on a fetch (dispatched to all tasks).
|
||||||
XHRProgressMsg(TrustedXHRAddress, XHRProgress),
|
XHRProgressMsg(TrustedXHRAddress, XHRProgress),
|
||||||
/// Message sent through postMessage
|
/// Message sent through Worker.postMessage (only dispatched to
|
||||||
|
/// DedicatedWorkerGlobalScope).
|
||||||
DOMMessage(DOMString),
|
DOMMessage(DOMString),
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue