mirror of
https://github.com/RGBCube/serenity
synced 2025-07-25 19:07:35 +00:00
LibWeb: Add size to URLSearchParams
Added new size parameter to URLSearchParams. Spec: https://url.spec.whatwg.org/#dom-urlsearchparams-size Co-Authored-By: Linus Groh <mail@linusgroh.de>
This commit is contained in:
parent
e231f72f61
commit
3e2ceef8c3
3 changed files with 10 additions and 0 deletions
|
@ -149,6 +149,13 @@ WebIDL::ExceptionOr<JS::NonnullGCPtr<URLSearchParams>> URLSearchParams::construc
|
|||
return URLSearchParams::create(realm, url_decode(stripped_init));
|
||||
}
|
||||
|
||||
// https://url.spec.whatwg.org/#dom-urlsearchparams-size
|
||||
size_t URLSearchParams::size() const
|
||||
{
|
||||
// The size getter steps are to return this’s list’s size.
|
||||
return m_list.size();
|
||||
}
|
||||
|
||||
void URLSearchParams::append(DeprecatedString const& name, DeprecatedString const& value)
|
||||
{
|
||||
// 1. Append a new name-value pair whose name is name and value is value, to list.
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue