aboutsummaryrefslogtreecommitdiffstats
path: root/components/script/dom/domparser.rs
diff options
context:
space:
mode:
Diffstat (limited to 'components/script/dom/domparser.rs')
-rw-r--r--components/script/dom/domparser.rs9
1 files changed, 6 insertions, 3 deletions
diff --git a/components/script/dom/domparser.rs b/components/script/dom/domparser.rs
index 0ce5487159a..30bbebf77df 100644
--- a/components/script/dom/domparser.rs
+++ b/components/script/dom/domparser.rs
@@ -10,7 +10,7 @@ use dom::bindings::global::GlobalRef;
use dom::bindings::global;
use dom::bindings::js::{JS, JSRef, Temporary};
use dom::bindings::utils::{Reflector, Reflectable, reflect_dom_object};
-use dom::document::{Document, HTMLDocument, NonHTMLDocument};
+use dom::document::{Document, HTMLDocument, NonHTMLDocument, NotFromParser};
use dom::window::Window;
use servo_util::str::DOMString;
@@ -44,12 +44,15 @@ impl<'a> DOMParserMethods for JSRef<'a, DOMParser> {
ty: DOMParserBinding::SupportedType)
-> Fallible<Temporary<Document>> {
let window = self.window.root();
+ //FIXME: these should probably be FromParser when we actually parse the string (#3756).
match ty {
Text_html => {
- Ok(Document::new(*window, None, HTMLDocument, Some("text/html".to_string())))
+ Ok(Document::new(*window, None, HTMLDocument, Some("text/html".to_string()),
+ NotFromParser))
}
Text_xml => {
- Ok(Document::new(*window, None, NonHTMLDocument, Some("text/xml".to_string())))
+ Ok(Document::new(*window, None, NonHTMLDocument, Some("text/xml".to_string()),
+ NotFromParser))
}
_ => {
Err(FailureUnknown)