LibWeb: Implement responseType and response for XHR

This makes us capable of loading non-utf8 content via XHR.
This commit is contained in:
Ali Mohammad Pur 2022-02-15 14:35:29 +03:30 committed by Ali Mohammad Pur
commit 385b07dcda
Notes: sideshowbarker 2024-07-17 18:42:18 +09:00
4 changed files with 133 additions and 9 deletions

View file

@ -1,3 +1,12 @@
enum XMLHttpRequestResponseType {
"",
"arraybuffer",
"blob",
"document",
"json",
"text"
};
interface XMLHttpRequest : XMLHttpRequestEventTarget {
constructor();
@ -11,6 +20,8 @@ interface XMLHttpRequest : XMLHttpRequestEventTarget {
readonly attribute unsigned short readyState;
readonly attribute unsigned short status;
readonly attribute DOMString responseText;
readonly attribute any response;
attribute XMLHttpRequestResponseType responseType;
undefined open(DOMString method, DOMString url);
undefined setRequestHeader(DOMString name, DOMString value);