mirror of
https://github.com/servo/servo.git
synced 2025-07-23 07:13:52 +01:00
Allow setting withCredentials in synchronous XMLHttpRequest
closes #10839
This commit is contained in:
parent
09b2efc706
commit
f56bd3a6f3
4 changed files with 3 additions and 24 deletions
|
@ -369,8 +369,7 @@ impl XMLHttpRequestMethods for XMLHttpRequest {
|
|||
// Step 10
|
||||
if !async {
|
||||
// FIXME: This should only happen if the global environment is a document environment
|
||||
if self.timeout.get() != 0 || self.with_credentials.get() ||
|
||||
self.response_type.get() != XMLHttpRequestResponseType::_empty {
|
||||
if self.timeout.get() != 0 || self.response_type.get() != XMLHttpRequestResponseType::_empty {
|
||||
return Err(Error::InvalidAccess)
|
||||
}
|
||||
}
|
||||
|
@ -507,8 +506,6 @@ impl XMLHttpRequestMethods for XMLHttpRequest {
|
|||
// Step 2
|
||||
_ if self.send_flag.get() => Err(Error::InvalidState),
|
||||
// Step 3
|
||||
_ if self.sync_in_window() => Err(Error::InvalidAccess),
|
||||
// Step 4
|
||||
_ => {
|
||||
self.with_credentials.set(with_credentials);
|
||||
Ok(())
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue