mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-07-30 20:59:16 +00:00
LibWeb: Add support to view JSON.
Extremely small change, all I did is check for application/json, mime type and parsed it as text.
This commit is contained in:
parent
31f7296934
commit
8560108717
Notes:
sideshowbarker
2024-07-18 21:12:31 +09:00
Author: https://github.com/aabajyan
Commit: 8560108717
Pull-request: https://github.com/SerenityOS/serenity/pull/5891
1 changed files with 1 additions and 1 deletions
|
@ -140,7 +140,7 @@ bool FrameLoader::parse_document(DOM::Document& document, const ByteBuffer& data
|
|||
}
|
||||
if (mime_type.starts_with("image/"))
|
||||
return build_image_document(document, data);
|
||||
if (mime_type == "text/plain")
|
||||
if (mime_type == "text/plain" || mime_type == "application/json")
|
||||
return build_text_document(document, data);
|
||||
if (mime_type == "text/markdown")
|
||||
return build_markdown_document(document, data);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue