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

LibWeb: Add the URL::{protocol, pathname, search, hash} attributes

This commit is contained in:
Idan Horowitz 2021-09-14 00:21:51 +03:00 committed by Andreas Kling
parent 7f9818bcbc
commit ed5128d759
3 changed files with 112 additions and 4 deletions

View file

@ -33,6 +33,9 @@ public:
String origin() const;
String protocol() const;
void set_protocol(String const&);
String username() const;
void set_username(String const&);
@ -48,8 +51,17 @@ public:
String port() const;
void set_port(String const&);
String pathname() const;
void set_pathname(String const&);
String search() const;
void set_search(String const&);
URLSearchParams const* search_params() const;
String hash() const;
void set_hash(String const&);
String to_json() const;
void set_query(Badge<URLSearchParams>, String query) { m_url.set_query(move(query)); }