1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-07-27 11:27:35 +00:00

LibWeb: Add XMLHttpRequest Document response type

This commit is contained in:
Bastiaan van der Plaat 2023-09-14 21:07:53 +02:00 committed by Alexander Kalenik
parent b8f8b22aa5
commit 222cc29c5c
7 changed files with 122 additions and 12 deletions

View file

@ -146,7 +146,7 @@ static bool build_gemini_document(DOM::Document& document, ByteBuffer const& dat
return true;
}
static bool build_xml_document(DOM::Document& document, ByteBuffer const& data)
bool build_xml_document(DOM::Document& document, ByteBuffer const& data)
{
auto encoding = HTML::run_encoding_sniffing_algorithm(document, data);
auto decoder = TextCodec::decoder_for(encoding);

View file

@ -11,6 +11,7 @@
namespace Web {
bool build_xml_document(DOM::Document& document, ByteBuffer const& data);
bool parse_document(DOM::Document& document, ByteBuffer const& data);
JS::GCPtr<DOM::Document> load_document(Optional<HTML::NavigationParams> navigation_params);
JS::GCPtr<DOM::Document> create_document_for_inline_content(JS::GCPtr<HTML::Navigable> navigable, Optional<String> navigation_id, StringView content_html);