1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-06-01 08:28:11 +00:00

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.
This commit is contained in:
Luke Wilde 2022-02-11 21:04:42 +00:00 committed by Andreas Kling
parent 8cfeca5261
commit 4ccade42b7
3 changed files with 24 additions and 0 deletions

View file

@ -18,6 +18,7 @@ interface XMLHttpRequest : XMLHttpRequestEventTarget {
ByteString? getResponseHeader(ByteString name);
ByteString getAllResponseHeaders();
undefined overrideMimeType(DOMString mime);
attribute EventHandler onreadystatechange;