Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Use URLSearchParams for paramsObject #88

Open
cailyncodes opened this issue Jul 27, 2017 · 0 comments
Open

Use URLSearchParams for paramsObject #88

cailyncodes opened this issue Jul 27, 2017 · 0 comments

Comments

@cailyncodes
Copy link

Currently, the paramsObject in iron-query-params.html is a native JS object. The most noticeable limitation of this approach is that every key can have at most one value. It is impossible to have the following paramsObject:

{
  "key": "value",
  "key": "otherValue"
}

The ability to have multiple values for one key is a fairly common need, especially in faceted searching.

The WHATWG spec defines a URLSearchParams class for interacting with query parameters of a URL. Web developers will be able to use a standard for interacting with query parameters of the URL instead of the custom implementation noted above.

This is a breaking change, but I feel there is great value in using a native class for query parameters. It will make the use and interaction with query parameters much more rich, as well as providing support for otherwise unattainable use cases.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant