[][src]Enum script_traits::script_msg::ScriptMsg

pub enum ScriptMsg {
    CompleteMessagePortTransfer(MessagePortRouterIdVec<MessagePortId>),
    MessagePortTransferResult(Option<MessagePortRouterId>, Vec<MessagePortId>, HashMap<MessagePortId, VecDeque<PortMessageTask>>),
    NewMessagePort(MessagePortRouterIdMessagePortId),
    NewMessagePortRouter(MessagePortRouterIdIpcSender<MessagePortMsg>),
    RemoveMessagePortRouter(MessagePortRouterId),
    RerouteMessagePort(MessagePortIdPortMessageTask),
    MessagePortShipped(MessagePortId),
    RemoveMessagePort(MessagePortId),
    EntanglePorts(MessagePortIdMessagePortId),
    NewBroadcastChannelRouter(BroadcastChannelRouterIdIpcSender<BroadcastMsg>, ImmutableOrigin),
    RemoveBroadcastChannelRouter(BroadcastChannelRouterIdImmutableOrigin),
    NewBroadcastChannelNameInRouter(BroadcastChannelRouterIdStringImmutableOrigin),
    RemoveBroadcastChannelNameInRouter(BroadcastChannelRouterIdStringImmutableOrigin),
    ScheduleBroadcast(BroadcastChannelRouterIdBroadcastMsg),
    ForwardToEmbedder(EmbedderMsg),
    InitiateNavigateRequest(RequestBuilderIpcReceiver<()>),
    BroadcastStorageEvent(StorageTypeServoUrlOption<String>, Option<String>, Option<String>),
    ChangeRunningAnimationsState(AnimationState),
    CreateCanvasPaintThread(UntypedSize2D<u64>, IpcSender<(IpcSender<CanvasMsg>, CanvasId)>),
    Focus,
    GetTopForBrowsingContext(BrowsingContextIdIpcSender<Option<TopLevelBrowsingContextId>>),
    GetBrowsingContextInfo(PipelineIdIpcSender<Option<(BrowsingContextId, Option<PipelineId>)>>),
    GetChildBrowsingContextId(BrowsingContextIdusizeIpcSender<Option<BrowsingContextId>>),
    LoadComplete,
    LoadUrl(LoadDataHistoryEntryReplacement),
    AbortLoadUrl,
    PostMessage {
        target: BrowsingContextId,
        source: PipelineId,
        target_origin: Option<ImmutableOrigin>,
        source_origin: ImmutableOrigin,
        data: StructuredSerializedData,
    },
    NavigatedToFragment(ServoUrlHistoryEntryReplacement),
    TraverseHistory(TraversalDirection),
    PushHistoryState(HistoryStateIdServoUrl),
    ReplaceHistoryState(HistoryStateIdServoUrl),
    JointSessionHistoryLength(IpcSender<u32>),
    RemoveIFrame(BrowsingContextIdIpcSender<Vec<PipelineId>>),
    VisibilityChangeComplete(bool),
    ScriptLoadedURLInIFrame(IFrameLoadInfoWithData),
    ScriptNewIFrame(IFrameLoadInfoWithDataIpcSender<LayoutControlMsg>),
    ScriptNewAuxiliary(AuxiliaryBrowsingContextLoadInfoIpcSender<LayoutControlMsg>),
    ActivateDocument,
    SetDocumentState(DocumentState),
    SetFinalUrl(ServoUrl),
    TouchEventProcessed(EventResult),
    LogEntry(Option<String>, LogEntry),
    DiscardDocument,
    DiscardTopLevelBrowsingContext,
    PipelineExited,
    ForwardDOMMessage(DOMMessageServoUrl),
    ScheduleJob(Job),
    GetClientWindow(IpcSender<(DeviceIntSize, DeviceIntPoint)>),
    GetScreenSize(IpcSender<DeviceIntSize>),
    GetScreenAvailSize(IpcSender<DeviceIntSize>),
    MediaSessionEvent(PipelineIdMediaSessionEvent),
    RequestAdapter(IpcSender<WebGPUResponseResult>, RequestAdapterOptionsSmallVec<[AdapterId; 4]>),
    GetWebGPUChan(IpcSender<WebGPU>),
    TitleChanged(PipelineIdString),
}

Messages from the script to the constellation.

Variants

CompleteMessagePortTransfer(MessagePortRouterIdVec<MessagePortId>)

Request to complete the transfer of a set of ports to a router.

MessagePortTransferResult(Option<MessagePortRouterId>, Vec<MessagePortId>, HashMap<MessagePortId, VecDeque<PortMessageTask>>)

The results of attempting to complete the transfer of a batch of ports.

NewMessagePort(MessagePortRouterIdMessagePortId)

A new message-port was created or transferred, with corresponding control-sender.

NewMessagePortRouter(MessagePortRouterIdIpcSender<MessagePortMsg>)

A global has started managing message-ports

RemoveMessagePortRouter(MessagePortRouterId)

A global has stopped managing message-ports

RerouteMessagePort(MessagePortIdPortMessageTask)

A task requires re-routing to an already shipped message-port.

MessagePortShipped(MessagePortId)

A message-port was shipped, let the entangled port know.

RemoveMessagePort(MessagePortId)

A message-port has been discarded by script.

EntanglePorts(MessagePortIdMessagePortId)

Entangle two message-ports.

NewBroadcastChannelRouter(BroadcastChannelRouterIdIpcSender<BroadcastMsg>, ImmutableOrigin)

A global has started managing broadcast-channels.

RemoveBroadcastChannelRouter(BroadcastChannelRouterIdImmutableOrigin)

A global has stopped managing broadcast-channels.

NewBroadcastChannelNameInRouter(BroadcastChannelRouterIdStringImmutableOrigin)

A global started managing broadcast channels for a given channel-name.

RemoveBroadcastChannelNameInRouter(BroadcastChannelRouterIdStringImmutableOrigin)

A global stopped managing broadcast channels for a given channel-name.

ScheduleBroadcast(BroadcastChannelRouterIdBroadcastMsg)

Broadcast a message to all same-origin broadcast channels, excluding the source of the broadcast.

ForwardToEmbedder(EmbedderMsg)

Forward a message to the embedder.

InitiateNavigateRequest(RequestBuilderIpcReceiver<()>)

Requests are sent to constellation and fetches are checked manually for cross-origin loads

BroadcastStorageEvent(StorageTypeServoUrlOption<String>, Option<String>, Option<String>)

Broadcast a storage event to every same-origin pipeline. The strings are key, old value and new value.

ChangeRunningAnimationsState(AnimationState)

Indicates whether this pipeline is currently running animations.

CreateCanvasPaintThread(UntypedSize2D<u64>, IpcSender<(IpcSender<CanvasMsg>, CanvasId)>)

Requests that a new 2D canvas thread be created. (This is done in the constellation because 2D canvases may use the GPU and we don't want to give untrusted content access to the GPU.)

Focus

Notifies the constellation that this frame has received focus.

GetTopForBrowsingContext(BrowsingContextIdIpcSender<Option<TopLevelBrowsingContextId>>)

Get the top-level browsing context info for a given browsing context.

GetBrowsingContextInfo(PipelineIdIpcSender<Option<(BrowsingContextId, Option<PipelineId>)>>)

Get the browsing context id of the browsing context in which pipeline is embedded and the parent pipeline id of that browsing context.

GetChildBrowsingContextId(BrowsingContextIdusizeIpcSender<Option<BrowsingContextId>>)

Get the nth child browsing context ID for a given browsing context, sorted in tree order.

LoadComplete

All pending loads are complete, and the load event for this pipeline has been dispatched.

LoadUrl(LoadDataHistoryEntryReplacement)

A new load has been requested, with an option to replace the current entry once loaded instead of adding a new entry.

AbortLoadUrl

Abort loading after sending a LoadUrl message.

PostMessage

Post a message to the currently active window of a given browsing context.

Fields of PostMessage

target: BrowsingContextId

The target of the posted message.

source: PipelineId

The source of the posted message.

target_origin: Option<ImmutableOrigin>

The expected origin of the target.

source_origin: ImmutableOrigin

The source origin of the message. https://html.spec.whatwg.org/multipage/#dom-messageevent-origin

data: StructuredSerializedData

The data to be posted.

NavigatedToFragment(ServoUrlHistoryEntryReplacement)

Inform the constellation that a fragment was navigated to and whether or not it was a replacement navigation.

TraverseHistory(TraversalDirection)

HTMLIFrameElement Forward or Back traversal.

PushHistoryState(HistoryStateIdServoUrl)

Inform the constellation of a pushed history state.

ReplaceHistoryState(HistoryStateIdServoUrl)

Inform the constellation of a replaced history state.

JointSessionHistoryLength(IpcSender<u32>)

Gets the length of the joint session history from the constellation.

RemoveIFrame(BrowsingContextIdIpcSender<Vec<PipelineId>>)

Notification that this iframe should be removed. Returns a list of pipelines which were closed.

VisibilityChangeComplete(bool)

Notifies constellation that an iframe's visibility has been changed.

ScriptLoadedURLInIFrame(IFrameLoadInfoWithData)

A load has been requested in an IFrame.

ScriptNewIFrame(IFrameLoadInfoWithDataIpcSender<LayoutControlMsg>)

A load of the initial about:blank has been completed in an IFrame.

ScriptNewAuxiliary(AuxiliaryBrowsingContextLoadInfoIpcSender<LayoutControlMsg>)

Script has opened a new auxiliary browsing context.

ActivateDocument

Mark a new document as active

SetDocumentState(DocumentState)

Set the document state for a pipeline (used by screenshot / reftests)

SetFinalUrl(ServoUrl)

Update the pipeline Url, which can change after redirections.

TouchEventProcessed(EventResult)

Script has handled a touch event, and either prevented or allowed default actions.

LogEntry(Option<String>, LogEntry)

A log entry, with the top-level browsing context id and thread name

DiscardDocument

Discard the document.

DiscardTopLevelBrowsingContext

Discard the browsing context.

PipelineExited

Notifies the constellation that this pipeline has exited.

ForwardDOMMessage(DOMMessageServoUrl)

Send messages from postMessage calls from serviceworker to constellation for storing in service worker manager

ScheduleJob(Job)

https://w3c.github.io/ServiceWorker/#schedule-job-algorithm.

GetClientWindow(IpcSender<(DeviceIntSize, DeviceIntPoint)>)

Get Window Informations size and position

GetScreenSize(IpcSender<DeviceIntSize>)

Get the screen size (pixel)

GetScreenAvailSize(IpcSender<DeviceIntSize>)

Get the available screen size (pixel)

MediaSessionEvent(PipelineIdMediaSessionEvent)

Notifies the constellation about media session events (i.e. when there is metadata for the active media session, playback state changes...).

RequestAdapter(IpcSender<WebGPUResponseResult>, RequestAdapterOptionsSmallVec<[AdapterId; 4]>)

Create a WebGPU Adapter instance

GetWebGPUChan(IpcSender<WebGPU>)

Get WebGPU channel

TitleChanged(PipelineIdString)

Notify the constellation of a pipeline's document's title.

Trait Implementations

impl Debug for ScriptMsg[src]

impl<'de> Deserialize<'de> for ScriptMsg[src]

impl Serialize for ScriptMsg[src]

Auto Trait Implementations

impl !RefUnwindSafe for ScriptMsg

impl Send for ScriptMsg

impl !Sync for ScriptMsg

impl Unpin for ScriptMsg

impl !UnwindSafe for ScriptMsg

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> DeserializeOwned for T where
    T: for<'de> Deserialize<'de>, 
[src]

impl<T> Erased for T[src]

impl<T> From<T> for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T> MaybeBoxed<Box<T>> for T[src]

impl<T> MaybeBoxed<T> for T[src]

impl<T> Same<T> for T[src]

type Output = T

Should always be Self

impl<T> SetParameter for T[src]

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.

impl<V, T> VZip<V> for T where
    V: MultiLane<T>, 
[src]