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

Element.prototype.matches not serving to old version of Edge #541

Closed
jacobg opened this issue Feb 28, 2020 · 3 comments · Fixed by #549
Closed

Element.prototype.matches not serving to old version of Edge #541

jacobg opened this issue Feb 28, 2020 · 3 comments · Fixed by #549

Comments

@jacobg
Copy link

jacobg commented Feb 28, 2020

What

Element.prototype.matches is not serving to old version of Edge.

Details

That is, this url:
https://cdn.polyfill.io/v3/polyfill.min.js?features=Element.prototype.matches
with this user agent string:
Mozilla/5.0 (Windows NT 10.0) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/51.0.2704.79 Safari/537.36 Edge/14.14393
taken from here:
https://developers.whatismybrowser.com/useragents/parse/288685-edge-windows-edgehtml
does not return the polyfill.

I was first thrown off my the Chrome/51.0.2704.79 token in the useragent string, because the new Edge is Chromium-based. But it seems like a red herring. Edge 38 is from 2016, so it seems that for some reason old versions of Edge that were not based on Chromium still include Chrome in the useragent string.

Is polyfill.io ignoring the Chrome token for old versions of Edge?

@pft
Copy link

pft commented Mar 13, 2020

Same problem here, but for URL and URLSearchParams. These are in fact implemented in Edge, but incorrectly: URLSearchParams do not percent-escape a field that also has spaces in them in old Edge (a bug that gets consistently ignored by the Edge team).

Polyfill.io did use to serve URL to old Edge, but now we have to explicitly add |always.

UA is "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/70.0.3538.102 Safari/537.36 Edge/18.18363"

@JakeChampion JakeChampion transferred this issue from polyfillpolyfill/polyfill-service Mar 13, 2020
@JakeChampion
Copy link
Owner

Same problem here, but for URL and URLSearchParams. These are in fact implemented in Edge, but incorrectly: URLSearchParams do not percent-escape a field that also has spaces in them in old Edge (a bug that gets consistently ignored by the Edge team).

Polyfill.io did use to serve URL to old Edge, but now we have to explicitly add |always.

UA is "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/70.0.3538.102 Safari/537.36 Edge/18.18363"

This is a different issue, as such I've opened a new issue for it, please subscribe to #540 for updates on when it is fixed :)

@JakeChampion
Copy link
Owner

What

Element.prototype.matches is not serving to old version of Edge.

Details

That is, this url:
https://cdn.polyfill.io/v3/polyfill.min.js?features=Element.prototype.matches
with this user agent string:
Mozilla/5.0 (Windows NT 10.0) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/51.0.2704.79 Safari/537.36 Edge/14.14393
taken from here:
https://developers.whatismybrowser.com/useragents/parse/288685-edge-windows-edgehtml
does not return the polyfill.

I was first thrown off my the Chrome/51.0.2704.79 token in the useragent string, because the new Edge is Chromium-based. But it seems like a red herring. Edge 38 is from 2016, so it seems that for some reason old versions of Edge that were not based on Chromium still include Chrome in the useragent string.

Is polyfill.io ignoring the Chrome token for old versions of Edge?

We detect it as Edge 14, there is no Edge 38 from what I understand. It looks like Edge versions below 18 need the Element.prototype.matches polyfill, I'v emade a pull-request to serve the polyfill to those browser versions --> #549

Origami ✨ automation moved this from incoming to complete Mar 19, 2020
@github-actions github-actions bot locked as resolved and limited conversation to collaborators Sep 16, 2020
@robertboulton robertboulton removed this from Done in Origami ✨ Jul 26, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants