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

url.relative #8

Open
guybedford opened this issue Nov 13, 2018 · 3 comments
Open

url.relative #8

guybedford opened this issue Nov 13, 2018 · 3 comments

Comments

@guybedford
Copy link

Would this fall under the considerations of this group?

See nodejs/node#616 (comment).

@stevenvachon
Copy link

stevenvachon commented Nov 13, 2018

relateurl. URL-compatible version is in the repo and has been in the works for a while at 99% completion. Should be finishing it in a few weeks. It's "done" now and will be released soon.

@guybedford
Copy link
Author

guybedford commented Dec 4, 2018

As discussed at the meeting - it might be nice to start by seeing if progress can be made on the WhatWG side of things here.

So perhaps we can come up with something we think might work for Node and propose it to WhatWG in an issue there?

I will start with a complete and utter strawman:

URL.relative(fromURL: URL | string, toURL: URL | string) -> string

Returns the relative url with fragment string of toURL from fromURL such that new URL(result, fromURL) would be the reverse operation.

//cc @nex3 who brought this one up in the first place!

If that sounds sensible... let's see what WhatWG think, as it seems like it wouldn't be "unuseful" in browsers.

@guybedford
Copy link
Author

I've created a WhatWG proposal issue at whatwg/url#421.

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