diff --git a/components/script/messaging.rs b/components/script/messaging.rs index 08d6fc841cf..9f9453305b8 100644 --- a/components/script/messaging.rs +++ b/components/script/messaging.rs @@ -92,6 +92,7 @@ impl MixedMessage { ScriptThreadMessage::SetWebGPUPort(..) => None, ScriptThreadMessage::SetScrollStates(id, ..) => Some(*id), ScriptThreadMessage::EvaluateJavaScript(id, _, _) => Some(*id), + ScriptThreadMessage::SetNetWorkState(..) => None, }, MixedMessage::FromScript(inner_msg) => match inner_msg { MainThreadScriptMsg::Common(CommonScriptMsg::Task(_, _, pipeline_id, _)) => { diff --git a/components/shared/script/lib.rs b/components/shared/script/lib.rs index 29acc51765c..d6c0531e6c3 100644 --- a/components/shared/script/lib.rs +++ b/components/shared/script/lib.rs @@ -248,6 +248,8 @@ pub enum ScriptThreadMessage { /// Evaluate the given JavaScript and return a result via a corresponding message /// to the Constellation. EvaluateJavaScript(PipelineId, JavaScriptEvaluationId, String), + /// Parameter indicates if online (true) or offline (false) + SetNetWorkState(bool), } impl fmt::Debug for ScriptThreadMessage {