pub enum CliCommand {
Show 20 variants
GetBrowserInfo,
ListWindows,
OpenWindow,
CloseWindow {
window_id: u32,
},
SetWindowTitlePrefix {
window_id: u32,
prefix: String,
},
RemoveWindowTitlePrefix {
window_id: u32,
},
ListTabs {
window_id: u32,
},
OpenTab {
window_id: u32,
insert_before_tab_id: Option<u32>,
insert_after_tab_id: Option<u32>,
url: Option<String>,
strip_credentials: bool,
},
ActivateTab {
tab_id: u32,
},
NavigateTab {
tab_id: u32,
url: String,
},
CloseTab {
tab_id: u32,
},
PinTab {
tab_id: u32,
},
UnpinTab {
tab_id: u32,
},
WarmupTab {
tab_id: u32,
},
MuteTab {
tab_id: u32,
},
UnmuteTab {
tab_id: u32,
},
MoveTab {
tab_id: u32,
new_index: u32,
},
GoBack {
tab_id: u32,
steps: u32,
},
GoForward {
tab_id: u32,
steps: u32,
},
SubscribeEvents,
}Expand description
A command sent from the CLI to the mediator, and forwarded to the extension.
Variants§
GetBrowserInfo
Retrieve information about the connected browser instance.
ListWindows
List all open windows with their tab summaries.
OpenWindow
Open a new browser window.
CloseWindow
Close an existing browser window.
SetWindowTitlePrefix
Set the title prefix (Firefox titlePreface) for a window.
Fields
RemoveWindowTitlePrefix
Remove the title prefix from a window, restoring the default title.
ListTabs
List all tabs in a window with full details.
OpenTab
Open a new tab in a window.
Fields
insert_before_tab_id: Option<u32>If set, the new tab will be inserted immediately before the tab with this ID.
insert_after_tab_id: Option<u32>If set, the new tab will be inserted immediately after the tab with this ID.
url: Option<String>The URL to load in the new tab, or the browser’s default new-tab page if absent.
strip_credentials: boolIf true, after the tab finishes loading the extension strips any user:password@
credentials from the URL and navigates to the clean URL.
This causes Firefox to cache the credentials (satisfying future auth challenges
automatically) while leaving the tab displaying the URL without embedded credentials.
Requires url to be set; ignored when url is absent.
ActivateTab
Activate a tab, making it the focused tab in its window.
Navigate an existing tab to a new URL.
CloseTab
Close a tab.
PinTab
Pin a tab.
UnpinTab
Unpin a tab.
WarmupTab
Warm up a discarded tab, loading its content into memory without activating it.
MuteTab
Mute a tab, suppressing any audio it produces.
UnmuteTab
Unmute a tab, allowing it to produce audio again.
MoveTab
Move a tab to a new position within its window.
Fields
GoBack
Navigate backward in a tab’s session history.
Returns a CliResult::Tab with the details of the page navigated to,
or the current tab state if the history boundary was already reached.
GoForward
Navigate forward in a tab’s session history.
Returns a CliResult::Tab with the details of the page navigated to,
or the current tab state if the history boundary was already reached.
Fields
SubscribeEvents
Subscribe to a live stream of browser events.
After sending this command the mediator streams BrowserEvent objects as
newline-delimited JSON on the same connection until the client disconnects.
No CliResponse is sent; events arrive directly as BrowserEvent JSON.
Trait Implementations§
Source§impl Clone for CliCommand
impl Clone for CliCommand
Source§fn clone(&self) -> CliCommand
fn clone(&self) -> CliCommand
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read more