diff options
author | Kris Tokarz <kj.tokarz@gmail.com> | 2019-09-29 07:34:36 -0400 |
---|---|---|
committer | Kris Tokarz <kj.tokarz@gmail.com> | 2019-09-29 07:34:36 -0400 |
commit | b567cc76e5adf00e24f46aa8b3337c3c3901ba46 (patch) | |
tree | 8cc5b15ec2649b0ecf1e620d30307a1c29e99853 /components/script/dom | |
parent | 5518951143faf918ffb990dc7750c1653e190729 (diff) | |
download | servo-b567cc76e5adf00e24f46aa8b3337c3c3901ba46.tar.gz servo-b567cc76e5adf00e24f46aa8b3337c3c3901ba46.zip |
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.
Diffstat (limited to 'components/script/dom')
-rw-r--r-- | components/script/dom/document.rs | 2 |
1 files changed, 1 insertions, 1 deletions
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::<Node>(); |