Auto merge of #10351 - stjepang:impl-url-searchparams, r=Manishearth

Implement URL.searchParams

Spec: https://url.spec.whatwg.org/#dom-url-searchparams
Closes #10335.

<!-- Reviewable:start -->
---
This change is [<img src="https://reviewable.io/review_button.svg" height="35" align="absmiddle" alt="Reviewable"/>](https://reviewable.io/reviews/servo/servo/10351)
<!-- Reviewable:end -->
This commit is contained in:
bors-servo 2016-04-06 14:27:30 +05:30
commit e36e3be855
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;
};