mirror of
https://github.com/servo/servo.git
synced 2025-08-13 09:25:32 +01:00
send message to embedder in prompt_to_unload
This commit is contained in:
parent
4234b1252a
commit
2812b3cf4a
3 changed files with 24 additions and 4 deletions
|
@ -266,6 +266,13 @@ impl Browser {
|
|||
self.event_queue.push(WindowEvent::SendError(browser_id, reason));
|
||||
}
|
||||
}
|
||||
EmbedderMsg::AllowUnload(sender) => {
|
||||
// Always allow unload for now.
|
||||
if let Err(e) = sender.send(true) {
|
||||
let reason = format!("Failed to send AllowUnload response: {}", e);
|
||||
self.event_queue.push(WindowEvent::SendError(browser_id, reason));
|
||||
}
|
||||
}
|
||||
EmbedderMsg::AllowNavigation(_url, response_chan) => {
|
||||
if let Err(e) = response_chan.send(true) {
|
||||
warn!("Failed to send allow_navigation() response: {}", e);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue