mirror of
https://github.com/servo/servo.git
synced 2025-07-29 02:00:23 +01:00
Added support for additional xml types to DOMParser::parseFromString
This commit is contained in:
parent
0594d58bc8
commit
9f2bd6779a
3 changed files with 7 additions and 22 deletions
|
@ -5,7 +5,10 @@
|
|||
use document_loader::DocumentLoader;
|
||||
use dom::bindings::codegen::Bindings::DOMParserBinding;
|
||||
use dom::bindings::codegen::Bindings::DOMParserBinding::DOMParserMethods;
|
||||
use dom::bindings::codegen::Bindings::DOMParserBinding::SupportedType::{Text_html, Text_xml};
|
||||
use dom::bindings::codegen::Bindings::DOMParserBinding::SupportedType::Application_xhtml_xml;
|
||||
use dom::bindings::codegen::Bindings::DOMParserBinding::SupportedType::Application_xml;
|
||||
use dom::bindings::codegen::Bindings::DOMParserBinding::SupportedType::Text_html;
|
||||
use dom::bindings::codegen::Bindings::DOMParserBinding::SupportedType::Text_xml;
|
||||
use dom::bindings::codegen::Bindings::DocumentBinding::DocumentReadyState;
|
||||
use dom::bindings::codegen::Bindings::WindowBinding::WindowMethods;
|
||||
use dom::bindings::error::Fallible;
|
||||
|
@ -70,7 +73,7 @@ impl DOMParserMethods for DOMParser {
|
|||
document.set_ready_state(DocumentReadyState::Complete);
|
||||
Ok(document)
|
||||
}
|
||||
Text_xml => {
|
||||
Text_xml | Application_xml | Application_xhtml_xml => {
|
||||
// FIXME: this should probably be FromParser when we actually parse the string (#3756).
|
||||
let document = Document::new(&self.window,
|
||||
None,
|
||||
|
|
|
@ -8,9 +8,9 @@
|
|||
|
||||
enum SupportedType {
|
||||
"text/html",
|
||||
"text/xml"/*,
|
||||
"text/xml",
|
||||
"application/xml",
|
||||
"application/xhtml+xml",
|
||||
"application/xhtml+xml"/*,
|
||||
"image/svg+xml"*/
|
||||
};
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue