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

URLSearchParams usage #7

Open
niksy opened this issue Nov 18, 2019 · 2 comments
Open

URLSearchParams usage #7

niksy opened this issue Nov 18, 2019 · 2 comments

Comments

@niksy
Copy link

niksy commented Nov 18, 2019

Do you plan on using native URLSearchParams API instead of querystring module to decode/encode query string? I see that it’s mentioned in codebase, but it’s not active since there is no Edge 16 support. Since this can also be polyfilled, maybe there is possibility to drop all 3rd party dependencies and go native all the way?

@janicklas-ralph
Copy link
Collaborator

janicklas-ralph commented Nov 19, 2019

The main reason for not using URLSearchParams is because it's not supported in Edge 16.
Since Edge 16 supports type=module scripts our polyfilling technique would not work.
So I'm not sure how we can polyfill URLSearchParams for all nomodule browsers + Edge 16 without doing something more complicated like reading the user-agent.

Let me know your thoughts on this and if you think theres a better way to polyfill URLSearchParams

@niksy
Copy link
Author

niksy commented Nov 28, 2019

Yeah, I understand. I think it’s then better to wait for wider URLSearchParams browser support.

Nevertheless, I liked the idea of native-url module so I went and created native-querystring, so that could work for developers who also want to polyfill URLSearchParams and use the convenience of querystring module!

Let me know if you’re interested in maybe mentioning this in your README (e.g. additional aliasing).

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

2 participants