mirror of
https://github.com/servo/servo.git
synced 2025-08-17 11:25:35 +01:00
implement window.open, create auxiliary browsing context
This commit is contained in:
parent
3e96a322ae
commit
f408b798c4
93 changed files with 476 additions and 324 deletions
|
@ -284,6 +284,18 @@ impl Browser {
|
|||
warn!("Failed to send AllowNavigation response: {}", e);
|
||||
}
|
||||
}
|
||||
EmbedderMsg::AllowOpeningBrowser(response_chan) => {
|
||||
// Note: would be a place to handle pop-ups config.
|
||||
// see Step 7 of #the-rules-for-choosing-a-browsing-context-given-a-browsing-context-name
|
||||
if let Err(e) = response_chan.send(true) {
|
||||
warn!("Failed to send AllowOpeningBrowser response: {}", e);
|
||||
};
|
||||
}
|
||||
EmbedderMsg::BrowserCreated(new_browser_id) => {
|
||||
// TODO: properly handle a new "tab"
|
||||
self.browser_id = Some(new_browser_id);
|
||||
self.event_queue.push(WindowEvent::SelectBrowser(new_browser_id));
|
||||
}
|
||||
EmbedderMsg::KeyEvent(ch, key, state, modified) => {
|
||||
self.handle_key_from_servo(browser_id, ch, key, state, modified);
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue