Re: [whatwg/url] API mechanism for reporting validity errors (Issue #811)

With regards to adding properties on the URL value: what happens if you mutate the value using one of the property setters?

For instance, let's imagine the path contains a % sign which is not part of a percent-encoded byte (e.g. `https://example.org/%s`). This would produce an [invalid-url-unit](https://url.spec.whatwg.org/#invalid-url-unit) validation error, and `url.valid` (option A) of the resulting value should return false.

Now let's imagine somebody uses the path setter to change the path to something valid. Does `url.valid` still return false? How do we know there is not some other component which _also_ contains non-valid contents (e.g. the same `%s` in the query)?

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

Message ID: <whatwg/url/issues/811/1891065286@github.com>

Received on Sunday, 14 January 2024 20:34:54 UTC