improve spec compliance of window.close

This commit is contained in:
Gregory Terzian 2018-05-26 23:41:34 +08:00
parent f63284efc0
commit 2753e5efab
12 changed files with 123 additions and 39 deletions

View file

@ -302,6 +302,12 @@ impl Browser {
EmbedderMsg::LoadComplete => {
self.loading_state = Some(LoadingState::Loaded);
}
EmbedderMsg::CloseBrowser => {
self.browser_id = None;
// Nothing left to do for now,
// but could hide a tab, and show another one, instead of quitting.
self.event_queue.push(WindowEvent::Quit);
},
EmbedderMsg::Shutdown => {
self.shutdown_requested = true;
},