Introduce GlobalScope::as_window

This commit is contained in:
Anthony Ramine 2016-10-02 16:19:43 +02:00
parent 2f54022761
commit 766010379e
22 changed files with 30 additions and 43 deletions

View file

@ -1224,7 +1224,7 @@ impl XMLHttpRequest {
fn new_doc(&self, is_html_document: IsHTMLDocument) -> Root<Document> {
let wr = self.global();
let wr = wr.r();
let win = wr.as_window();
let win = wr.as_global_scope().as_window();
let doc = win.Document();
let doc = doc.r();
let docloader = DocumentLoader::new(&*doc.loader());