Merge pull request #2771 from jviereck/fix_2230_link_DOMImplementation_to_document

Link DOMImplementation to the Document; r=Ms2ger
This commit is contained in:
Ms2ger 2014-07-13 17:20:25 +02:00
commit df4bb6947e
2 changed files with 14 additions and 13 deletions

View file

@ -329,8 +329,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())
}