update XHR send to use XMLHttpRequestBodyInit

This commit is contained in:
Gregory Terzian 2020-06-05 15:08:57 +08:00
parent 8536cee72c
commit dc690653da
2 changed files with 16 additions and 31 deletions

View file

@ -12,8 +12,11 @@
* http://www.openwebfoundation.org/legal/the-owf-1-0-agreements/owfa-1-0.
*/
// https://fetch.spec.whatwg.org/#typedefdef-xmlhttprequestbodyinit
typedef (Blob or BufferSource or FormData or DOMString or URLSearchParams) XMLHttpRequestBodyInit;
// https://fetch.spec.whatwg.org/#bodyinit
typedef (Blob or BufferSource or FormData or DOMString or URLSearchParams or ReadableStream) BodyInit;
typedef (ReadableStream or XMLHttpRequestBodyInit) BodyInit;
enum XMLHttpRequestResponseType {
"",
@ -54,7 +57,7 @@ interface XMLHttpRequest : XMLHttpRequestEventTarget {
attribute boolean withCredentials;
readonly attribute XMLHttpRequestUpload upload;
[Throws]
void send(optional (Document or BodyInit)? data = null);
void send(optional (Document or XMLHttpRequestBodyInit)? data = null);
void abort();
// response