Re: [whatwg/url] Allow specifying additional "special" schemes. (Issue #749)

I think the answer here is 5. It's worth clarifying in the standard that this is a non-goal, as it indeed occasionally comes up.

Instead what you'd do is define a processor that takes a URL and turns it into a data structure suitable for further usage. E.g., what we do in https://fetch.spec.whatwg.org/#data-urls for `data:` URLs. Such a scheme-specific processor can take care of adding a path, further processing an opaque host, etc.

The reason for that is that URL parsing ought to be stable over time and across implementations. Implementations should not have differing views as to what a URL string represents, how it serializes, etc. And if URLs are further processed ideally that aligns across implementations as well, but that will only happen in implementations purporting to support the scheme, which will be a subset.

-- 
Reply to this email directly or view it on GitHub:
https://github.com/whatwg/url/issues/749#issuecomment-1418839099
You are receiving this because you are subscribed to this thread.

Message ID: <whatwg/url/issues/749/1418839099@github.com>

Received on Monday, 6 February 2023 10:17:38 UTC