1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-05-28 22:15:07 +00:00
serenity/Userland/Libraries/LibWeb/XHR/XMLHttpRequest.idl
Luke Wilde 4ccade42b7 LibWeb: Implement XMLHttpRequest.overrideMimeType
This allows you to ignore the Content-Type returned by the server and
always parse the content as if it's the given MIME type.

This will currently be used for allowing you to override the charset
of text responses.
2022-02-12 12:53:28 +01:00

25 lines
776 B
Text

interface XMLHttpRequest : XMLHttpRequestEventTarget {
constructor();
const unsigned short UNSENT = 0;
const unsigned short OPENED = 1;
const unsigned short HEADERS_RECEIVED = 2;
const unsigned short LOADING = 3;
const unsigned short DONE = 4;
readonly attribute unsigned short readyState;
readonly attribute unsigned short status;
readonly attribute DOMString responseText;
undefined open(DOMString method, DOMString url);
undefined setRequestHeader(DOMString name, DOMString value);
undefined send(optional USVString body = {});
ByteString? getResponseHeader(ByteString name);
ByteString getAllResponseHeaders();
undefined overrideMimeType(DOMString mime);
attribute EventHandler onreadystatechange;
};