mirror of
https://github.com/servo/servo.git
synced 2025-08-06 14:10:11 +01:00
auto merge of #1775 : sawrubh/servo/issue1741, r=jdm
This commit is contained in:
commit
5725d9afdd
1 changed files with 3 additions and 3 deletions
|
@ -7,7 +7,7 @@ use dom::bindings::codegen::DOMParserBinding::SupportedTypeValues::{Text_html, T
|
|||
use dom::bindings::js::JS;
|
||||
use dom::bindings::utils::{Reflector, Reflectable, reflect_dom_object};
|
||||
use dom::bindings::error::{Fallible, FailureUnknown};
|
||||
use dom::document::{Document, HTMLDocument};
|
||||
use dom::document::{Document, HTMLDocument, NonHTMLDocument};
|
||||
use dom::window::Window;
|
||||
use servo_util::str::DOMString;
|
||||
|
||||
|
@ -40,10 +40,10 @@ impl DOMParser {
|
|||
-> Fallible<JS<Document>> {
|
||||
match ty {
|
||||
Text_html => {
|
||||
Ok(Document::new(&self.owner, None, HTMLDocument, None))
|
||||
Ok(Document::new(&self.owner, None, HTMLDocument, Some(~"text/html")))
|
||||
}
|
||||
Text_xml => {
|
||||
Document::Constructor(&self.owner)
|
||||
Ok(Document::new(&self.owner, None, NonHTMLDocument, Some(~"text/xml")))
|
||||
}
|
||||
_ => {
|
||||
Err(FailureUnknown)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue