mirror of
https://github.com/servo/servo.git
synced 2025-08-03 04:30:10 +01:00
Ensure we get the post-redirect url
This commit is contained in:
parent
2a701cc339
commit
f44470ef52
6 changed files with 14 additions and 7 deletions
|
@ -24,6 +24,7 @@ use js::jsval::UndefinedValue;
|
|||
|
||||
use ipc_channel::ipc::IpcSender;
|
||||
use std::rc::Rc;
|
||||
use url::Url;
|
||||
|
||||
fn find_node_by_unique_id(page: &Rc<Page>, pipeline: PipelineId, node_id: String) -> Option<Root<Node>> {
|
||||
let page = get_page(&*page, pipeline);
|
||||
|
@ -179,3 +180,10 @@ pub fn handle_get_name(page: &Rc<Page>,
|
|||
None => Err(())
|
||||
}).unwrap();
|
||||
}
|
||||
|
||||
pub fn handle_get_url(page: &Rc<Page>,
|
||||
_pipeline: PipelineId,
|
||||
reply: IpcSender<Url>) {
|
||||
let url = page.document().r().url();
|
||||
reply.send(url).unwrap();
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue