LibWeb/Fetch: Use "json" destination

See:
- da8d0d8
- 49bff76
- 37659e9
This commit is contained in:
Jamie Mansfield 2024-05-03 20:44:06 +01:00 committed by Andrew Kaster
commit 987198782c
Notes: sideshowbarker 2024-07-17 16:23:06 +09:00
5 changed files with 18 additions and 8 deletions

View file

@ -99,12 +99,13 @@ bool Request::destination_is_script_like() const
// https://fetch.spec.whatwg.org/#subresource-request
bool Request::is_subresource_request() const
{
// A subresource request is a request whose destination is "audio", "audioworklet", "font", "image", "manifest", "paintworklet", "script", "style", "track", "video", "xslt", or the empty string.
// A subresource request is a request whose destination is "audio", "audioworklet", "font", "image", "json", "manifest", "paintworklet", "script", "style", "track", "video", "xslt", or the empty string.
static constexpr Array subresource_request_destinations = {
Destination::Audio,
Destination::AudioWorklet,
Destination::Font,
Destination::Image,
Destination::JSON,
Destination::Manifest,
Destination::PaintWorklet,
Destination::Script,