Detect URL implementations that don't support search setter#143
Detect URL implementations that don't support search setter#143JakeChampion wants to merge 2 commits intoinexorabletash:masterfrom JakeChampion:safari-10-url
Conversation
|
@inexorabletash, would you be able to review this at all? |
| var url = new URL('http://example.com'); | ||
| url.search = 'a=1&b=2'; | ||
| if (url.href === 'http://example.com/?a=1&b=2') { | ||
| url.search = ''; |
There was a problem hiding this comment.
There's a problem with this.
It detects https://bugs.webkit.org/show_bug.cgi?id=162345 which is pretty minor.
Replacing URL.prototype.search's setter would be better in that case.
|
Sorry for the delay - definitely busy with other projects and not actively maintaining this; I appreciate the reviews by others. There's also #151- if folks can agree on something that at least passes the same tests as now (and hopefully adds/passes more) I'll merge it. |
|
@JakeChampion - transferring ownership of this project is a possibility; I'm not even using it any more (I've gone for a subset). |
It looks like Safari 10.1 has an issue with the URL search setter. I've patched the feature detection in the polyfill to ensure that the polyfill is applied if URL implementations have a buggy search setter.

Here is a screenshot of the tests running on Safari 10.1:
Here is a screenshot of the tests running on Safari 10.1 after the feature detect was patched:
