diff options
Diffstat (limited to 'components/script_traits/script_msg.rs')
-rw-r--r-- | components/script_traits/script_msg.rs | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/components/script_traits/script_msg.rs b/components/script_traits/script_msg.rs index c3ee8d75205..bd841614212 100644 --- a/components/script_traits/script_msg.rs +++ b/components/script_traits/script_msg.rs @@ -284,7 +284,12 @@ pub struct ScopeThings { /// Message that gets passed to service worker scope on postMessage #[derive(Clone, Debug, Deserialize, Serialize)] -pub struct DOMMessage(pub Vec<u8>); +pub struct DOMMessage { + /// The origin of the message + pub origin: String, + /// The payload of the message + pub data: Vec<u8>, +} /// Channels to allow service worker manager to communicate with constellation and resource thread pub struct SWManagerSenders { |