Implement URL.searchParams

Spec: https://url.spec.whatwg.org/#dom-url-searchparams
This commit is contained in:
Stjepan Glavina 2016-04-01 22:25:08 +02:00
parent b38fafcf11
commit 7b38f289b0
5 changed files with 50 additions and 18 deletions

View file

@ -20,7 +20,7 @@ interface URL {
attribute USVString port;
attribute USVString pathname;
attribute USVString search;
// readonly attribute URLSearchParams searchParams;
readonly attribute URLSearchParams searchParams;
attribute USVString hash;
// This is only doing as well as gecko right now.

View file

@ -15,6 +15,8 @@ interface URLSearchParams {
sequence<USVString> getAll(USVString name);
boolean has(USVString name);
void set(USVString name, USVString value);
// Be careful with implementing iterable interface.
// Search params might be mutated by URL::SetSearch while iterating (discussed in PR #10351).
// iterable<USVString, USVString>;
stringifier;
};