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

chore: always use whatwg-url #1

Merged
merged 1 commit into from Jul 6, 2021
Merged

chore: always use whatwg-url #1

merged 1 commit into from Jul 6, 2021

Conversation

addaleax
Copy link
Collaborator

@addaleax addaleax commented Jul 6, 2021

This gives us consistency across environments when there are edge
cases (in particular, the browser URL parser handles URLs that
start with protocols very differently, e.g.
new URL("bar://foo/baz").pathname === "//foo/baz").

This gives us consistency across environments when there are edge
cases (in particular, the browser URL parser handles URLs that
start with protocols very differently, e.g.
`new URL("bar://foo/baz").pathname === "//foo/baz"`).
@addaleax addaleax merged commit cebcaae into main Jul 6, 2021
@addaleax addaleax deleted the always-whatwg-url branch July 6, 2021 11:07
abstract hostname: never;
abstract port: never;
abstract href: string;
abstract get host(): never;
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

what is the difference between the abstract property and the getter/setter?

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@mcasimir I don’t know why, but the TS definitions for whatwg-url use accessors, and the TS definitions for the global URL use properties. 🤷‍♀️

@jimmywarting
Copy link

Can you also create a follow up issue that tracks browser bugs so we know when we can stop rely on a heavy polyfill?
Also so we don't mistakenly replace it with the built in version again. should exist a test case if it dose not already do so.

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