Fix DOMImplementation should be linked to the Document

This fixes issues 2230.
This commit is contained in:
Julian Viereck 2014-07-05 12:49:37 +02:00
parent 07db2d3273
commit 88b3998d59
2 changed files with 14 additions and 13 deletions

View file

@ -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())
}