mirror of
https://github.com/servo/servo.git
synced 2025-08-12 08:55:32 +01:00
Add support for launching devtools server on random port
Assign random port to devtools server in case user does not specify a port explicitly and report it to the embedding layer for display to user.
This commit is contained in:
parent
6ab923c8e8
commit
94db0d61cb
10 changed files with 73 additions and 9 deletions
|
@ -423,6 +423,13 @@ impl HostTrait for HostCallbacks {
|
|||
}
|
||||
|
||||
fn set_clipboard_contents(&self, _contents: String) {}
|
||||
|
||||
fn on_devtools_started(&self, port: Result<u16, ()>) {
|
||||
match port {
|
||||
Ok(p) => info!("Devtools Server running on port {}", p),
|
||||
Err(()) => error!("Error running Devtools server"),
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
pub struct ServoInstance {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue