mirror of
https://github.com/servo/servo.git
synced 2025-06-20 15:18:58 +01:00
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.
This commit is contained in:
parent
5518951143
commit
b567cc76e5
1 changed files with 1 additions and 1 deletions
|
@ -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>();
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue