diff options
author | Kenneth Myhra <kennethmyhra@gmail.com> | 2023-03-01 20:10:01 +0100 |
---|---|---|
committer | Linus Groh <mail@linusgroh.de> | 2023-03-01 22:44:20 +0000 |
commit | 9da09e4fd30a223103d45b040719eff171dea272 (patch) | |
tree | 743710ee607b3ad3125cbd672287a1a299b36b6b /Userland/Libraries/LibWeb/URL/URL.h | |
parent | 843c9d6cd77dadfa669253db78e0cb1c0ff7c258 (diff) | |
download | serenity-9da09e4fd30a223103d45b040719eff171dea272.zip |
LibWeb: Port URL and URLSearchParams to new String
Diffstat (limited to 'Userland/Libraries/LibWeb/URL/URL.h')
-rw-r--r-- | Userland/Libraries/LibWeb/URL/URL.h | 48 |
1 files changed, 24 insertions, 24 deletions
diff --git a/Userland/Libraries/LibWeb/URL/URL.h b/Userland/Libraries/LibWeb/URL/URL.h index 4ed9d98df2..e290e32990 100644 --- a/Userland/Libraries/LibWeb/URL/URL.h +++ b/Userland/Libraries/LibWeb/URL/URL.h @@ -20,47 +20,47 @@ class URL : public Bindings::PlatformObject { public: static WebIDL::ExceptionOr<JS::NonnullGCPtr<URL>> create(JS::Realm&, AK::URL url, JS::NonnullGCPtr<URLSearchParams> query); - static WebIDL::ExceptionOr<JS::NonnullGCPtr<URL>> construct_impl(JS::Realm&, DeprecatedString const& url, DeprecatedString const& base); + static WebIDL::ExceptionOr<JS::NonnullGCPtr<URL>> construct_impl(JS::Realm&, String const& url, Optional<String> const& base = {}); virtual ~URL() override; - DeprecatedString href() const; - WebIDL::ExceptionOr<void> set_href(DeprecatedString const&); + WebIDL::ExceptionOr<String> href() const; + WebIDL::ExceptionOr<void> set_href(String const&); - DeprecatedString origin() const; + WebIDL::ExceptionOr<String> origin() const; - DeprecatedString protocol() const; - void set_protocol(DeprecatedString const&); + WebIDL::ExceptionOr<String> protocol() const; + WebIDL::ExceptionOr<void> set_protocol(String const&); - DeprecatedString username() const; - void set_username(DeprecatedString const&); + WebIDL::ExceptionOr<String> username() const; + void set_username(String const&); - DeprecatedString password() const; - void set_password(DeprecatedString const&); + WebIDL::ExceptionOr<String> password() const; + void set_password(String const&); - DeprecatedString host() const; - void set_host(DeprecatedString const&); + WebIDL::ExceptionOr<String> host() const; + void set_host(String const&); - DeprecatedString hostname() const; - void set_hostname(DeprecatedString const&); + WebIDL::ExceptionOr<String> hostname() const; + void set_hostname(String const&); - DeprecatedString port() const; - void set_port(DeprecatedString const&); + WebIDL::ExceptionOr<String> port() const; + void set_port(String const&); - DeprecatedString pathname() const; - void set_pathname(DeprecatedString const&); + WebIDL::ExceptionOr<String> pathname() const; + void set_pathname(String const&); - DeprecatedString search() const; - void set_search(DeprecatedString const&); + WebIDL::ExceptionOr<String> search() const; + WebIDL::ExceptionOr<void> set_search(String const&); URLSearchParams const* search_params() const; - DeprecatedString hash() const; - void set_hash(DeprecatedString const&); + WebIDL::ExceptionOr<String> hash() const; + void set_hash(String const&); - DeprecatedString to_json() const; + WebIDL::ExceptionOr<String> to_json() const; - void set_query(Badge<URLSearchParams>, DeprecatedString query) { m_url.set_query(move(query)); } + void set_query(Badge<URLSearchParams>, String query) { m_url.set_query(query.to_deprecated_string()); } private: URL(JS::Realm&, AK::URL, JS::NonnullGCPtr<URLSearchParams> query); |