url-polyfill
url-polyfill copied to clipboard
IE11 object missing most fields
Here's my example URL:
https://dash.local/Auth/o/authorize/?response_type=token&client_id=eC5Tuezee6eebahn5xo9moo4edai2weepheethah&redirect_uri=https://dash.local/Manager/oauth2-redirect&state=Manager
When I parse it in Chrome:
hash: ""
host: "dash.local"
hostname: "dash.local"
href: "https://dash.local/Auth/o/authorize/?response_type=token&client_id=eC5Tuezee6eebahn5xo9moo4edai2weepheethah&redirect_uri=https://dash.local/Manager/oauth2-redirect&state=Manager"
origin: "https://dash.local"
password: ""
pathname: "/Auth/o/authorize/"
port: ""
protocol: "https:"
search: "?response_type=token&client_id=eC5Tuezee6eebahn5xo9moo4edai2weepheethah&redirect_uri=https://dash.local/Manager/oauth2-redirect&state=Manager"
searchParams: URLSearchParams {}
username: ""
__proto__: URL
When I parse it in IE11 (that thing won't let me copy/paste...):
host, hostname, protocol are all missing.
Got things working with this one for now: https://github.com/Financial-Times/polyfill-library/blob/master/polyfills/URL/polyfill.js
FWIW, was just experimenting with this polyfill and tried the URL you provided above, and it seems to parse correctly:

Yeah, that's weird. Gonna give it another shot when I have my hands on IE again.