diff options
Diffstat (limited to 'components/script/dom/xmlhttprequest.rs')
-rw-r--r-- | components/script/dom/xmlhttprequest.rs | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/components/script/dom/xmlhttprequest.rs b/components/script/dom/xmlhttprequest.rs index 1d7c2bffd34..8d6716201af 100644 --- a/components/script/dom/xmlhttprequest.rs +++ b/components/script/dom/xmlhttprequest.rs @@ -828,6 +828,12 @@ impl XMLHttpRequestMethods for XMLHttpRequest { // https://xhr.spec.whatwg.org/#the-responsexml-attribute fn GetResponseXML(&self) -> Fallible<Option<Root<Document>>> { + // TODO(#2823): Until [Exposed] is implemented, this attribute needs to return null + // explicitly in the worker scope. + if let GlobalRoot::Worker(_) = self.global() { + return Ok(None); + } + match self.response_type.get() { XMLHttpRequestResponseType::_empty | XMLHttpRequestResponseType::Document => { // Step 3 |