aboutsummaryrefslogtreecommitdiffstats
path: root/src/components/script/dom/document.rs
diff options
context:
space:
mode:
authorJulian Viereck <julian.viereck@gmail.com>2014-07-05 12:49:37 +0200
committerJulian Viereck <julian.viereck@gmail.com>2014-07-13 16:14:45 +0200
commit88b3998d59bf435c67e30ca9a0c16e273e114361 (patch)
tree2db2a8991700651c79ef537cc889b8ece5445012 /src/components/script/dom/document.rs
parent07db2d32732225b6dff73e22213434456fde640f (diff)
downloadservo-88b3998d59bf435c67e30ca9a0c16e273e114361.tar.gz
servo-88b3998d59bf435c67e30ca9a0c16e273e114361.zip
Fix DOMImplementation should be linked to the Document
This fixes issues 2230.
Diffstat (limited to 'src/components/script/dom/document.rs')
-rw-r--r--src/components/script/dom/document.rs3
1 files changed, 1 insertions, 2 deletions
diff --git a/src/components/script/dom/document.rs b/src/components/script/dom/document.rs
index 0bace6cf66a..3c205b881a0 100644
--- a/src/components/script/dom/document.rs
+++ b/src/components/script/dom/document.rs
@@ -339,8 +339,7 @@ impl<'a> DocumentMethods for JSRef<'a, Document> {
// http://dom.spec.whatwg.org/#dom-document-implementation
fn Implementation(&self) -> Temporary<DOMImplementation> {
if self.implementation.get().is_none() {
- let window = self.window.root();
- self.implementation.assign(Some(DOMImplementation::new(&*window)));
+ self.implementation.assign(Some(DOMImplementation::new(self)));
}
Temporary::new(self.implementation.get().get_ref().clone())
}