Updated content_type of Document and XMLDocument from DOCString to Mime

This commit is contained in:
Nupur Baghel 2018-02-07 16:41:19 +05:30
parent 1662fd7357
commit d02422408e
6 changed files with 23 additions and 21 deletions

View file

@ -54,7 +54,7 @@ impl DOMParserMethods for DOMParser {
ty: DOMParserBinding::SupportedType)
-> Fallible<DomRoot<Document>> {
let url = self.window.get_url();
let content_type = DOMString::from(ty.as_str());
let content_type = ty.as_str().parse().expect("Supported type is not a MIME type");
let doc = self.window.Document();
let loader = DocumentLoader::new(&*doc.loader());
match ty {