1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-07-26 21:07:36 +00:00

LibWeb: Implement XMLHttpRequest.getResponseHeader()

This lets jQuery's AJAX functionality progress further :^)
This commit is contained in:
Linus Groh 2021-04-03 15:51:15 +02:00 committed by Andreas Kling
parent 288b90a297
commit 57ead17d54
4 changed files with 8 additions and 2 deletions

View file

@ -76,6 +76,8 @@ public:
DOM::ExceptionOr<void> set_request_header(const String& header, const String& value);
String get_response_header(const String& name) { return m_response_headers.get(name).value_or({}); }
private:
virtual void ref_event_target() override { ref(); }
virtual void unref_event_target() override { unref(); }
@ -98,6 +100,7 @@ private:
URL m_url;
HashMap<String, String, CaseInsensitiveStringTraits> m_request_headers;
HashMap<String, String, CaseInsensitiveStringTraits> m_response_headers;
bool m_synchronous { false };
bool m_upload_complete { false };