mirror of
https://github.com/servo/servo.git
synced 2025-08-06 22:15:33 +01:00
Let the embedder decide if servo should follow a link or not
This commit is contained in:
parent
d0856fd4cd
commit
79a5bf0cbf
6 changed files with 27 additions and 0 deletions
|
@ -1575,6 +1575,13 @@ impl<Message, LTF, STF> Constellation<Message, LTF, STF>
|
|||
}
|
||||
|
||||
fn load_url(&mut self, source_id: PipelineId, load_data: LoadData, replace: bool) -> Option<PipelineId> {
|
||||
// Allow the embedder to handle the url itself
|
||||
let (chan, port) = ipc::channel().expect("Failed to create IPC channel!");
|
||||
self.compositor_proxy.send(ToCompositorMsg::AllowNavigation(load_data.url.clone(), chan));
|
||||
if let Ok(false) = port.recv() {
|
||||
return None;
|
||||
}
|
||||
|
||||
debug!("Loading {} in pipeline {}.", load_data.url, source_id);
|
||||
// If this load targets an iframe, its framing element may exist
|
||||
// in a separate script thread than the framed document that initiated
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue