- From: Guy Bedford <notifications@github.com>
- Date: Tue, 30 Jul 2019 17:09:03 -0700
- To: whatwg/url <url@noreply.github.com>
- Cc: Subscribed <subscribed@noreply.github.com>
Received on Wednesday, 31 July 2019 00:09:25 UTC
In my own experience working with module specifiers in the module system, the lack of a reliable `URL.relative` when outputting relative module URLs has been a constant pain point. I guess relative representations form a sort of hierarchy: 1. Hash-relative 2. Path-relative 3. Absolute path 4. Absolute protocol path 5. Full URL Does that comprehensively cover the forms? So far we've been suggesting (2) falling back to (5) as being the canonical approach. There are certainly arguments that (3) and (4) are useful too. If this were C, I'd suggest flags for these forms, that could be composed as a second argument, which would then apply them in hierarchy and fail otherwise, but given that this is a JS API, I'm not sure how best to capture that. Ideas welcome. -- You are receiving this because you are subscribed to this thread. Reply to this email directly or view it on GitHub: https://github.com/whatwg/url/issues/421#issuecomment-516642094
Received on Wednesday, 31 July 2019 00:09:25 UTC