1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-07-26 12:47:45 +00:00

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
parent 16c0646b9d
commit 385b07dcda
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);