From b567cc76e5adf00e24f46aa8b3337c3c3901ba46 Mon Sep 17 00:00:00 2001 From: Kris Tokarz Date: Sun, 29 Sep 2019 07:34:36 -0400 Subject: [PATCH] Change setBody to be less strict when getting the immediate child Step four of the dom document body calls for throwing an exception if no document element was found. The current setBody implementation was looking for a document element that is also an html element. It has been updated to use GetDocumentElement which returns any document element. --- components/script/dom/document.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/components/script/dom/document.rs b/components/script/dom/document.rs index 91f5e19dc7c..da44169ce59 100644 --- a/components/script/dom/document.rs +++ b/components/script/dom/document.rs @@ -3996,7 +3996,7 @@ impl DocumentMethods for Document { return Ok(()); } - match (self.get_html_element(), &old_body) { + match (self.GetDocumentElement(), &old_body) { // Step 3. (Some(ref root), &Some(ref child)) => { let root = root.upcast::();