Remove unused checking

We've supported [Exposed] so no need to check the global scope type!
This commit is contained in:
CYBAI 2019-09-26 22:53:10 +09:00
parent 049527872e
commit 7432913b7f

View file

@ -935,12 +935,6 @@ impl XMLHttpRequestMethods for XMLHttpRequest {
// https://xhr.spec.whatwg.org/#the-responsexml-attribute // https://xhr.spec.whatwg.org/#the-responsexml-attribute
fn GetResponseXML(&self) -> Fallible<Option<DomRoot<Document>>> { fn GetResponseXML(&self) -> Fallible<Option<DomRoot<Document>>> {
// TODO(#2823): Until [Exposed] is implemented, this attribute needs to return null
// explicitly in the worker scope.
if self.global().is::<WorkerGlobalScope>() {
return Ok(None);
}
match self.response_type.get() { match self.response_type.get() {
XMLHttpRequestResponseType::_empty | XMLHttpRequestResponseType::Document => { XMLHttpRequestResponseType::_empty | XMLHttpRequestResponseType::Document => {
// Step 3 // Step 3