mirror of
https://github.com/servo/servo.git
synced 2025-06-24 09:04:33 +01:00
DOMParser should pass the correct contentType (fixes #1741)
This commit is contained in:
parent
817c57b5b4
commit
a790a566df
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