Make Document::url return the page's URL to avoid stale URLs after redirects.

This commit is contained in:
Josh Matthews 2014-12-30 16:52:13 -05:00
parent 19fbb9e568
commit ae2b74c783
4 changed files with 8 additions and 7 deletions

View file

@ -1574,7 +1574,7 @@ impl Node {
false => IsHTMLDocument::NonHTMLDocument,
};
let window = document.window().root();
let document = Document::new(window.r(), Some(document.url().clone()),
let document = Document::new(window.r(), Some(document.url()),
is_html_doc, None,
DocumentSource::NotFromParser);
NodeCast::from_temporary(document)