-
Notifications
You must be signed in to change notification settings - Fork 141
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
Redesign URLUtils #62
Comments
Note that because we need to determine whether the value passed to the setter is valid, they cannot be part of the URL parser most likely. Although I should investigate returning failure more and see if that's sufficient. Also, for |
So what does this mean?
Another thing that seems mutually exclusive is that |
Thoughts:
|
The only reason we'd want an "internal URL" for |
So
With these four concepts I should be able to define this in a way that works for all these objects. Additionally some setters that need to throw might have additional special casing. |
Here is another sketch of the various behaviors we have.
Location is the most special due to its behavior for setters. Perhaps the best approach is just to specify its setters separately. |
I'd suggest minimizing side effects for clarity. So instead of reset actually setting url to parsedURL, have reset return parsedURL, and have each algorithm step do "set url = reset()". (Hmm, maybe you can get rid of reset entirely? I don't understand what it's consulting when you say "if non-relative flag is set"... do
As written this is pretty unclear. But I trust you'll have a way of writing it more clearly when you formalize it. Again I would urge avoiding side effects, so you can do something more like "set url = parse(given value, url)".
Make sure to add a note explaining that it explicitly does not update anything, and that the result is that
Same issue as before about avoiding side effects. Let's explicitly call out the internal state and provided hooks in each case:
|
|
… out See whatwg/url#62 for details.
… out See #164 and whatwg/url#62 for details.
The URLUtils abstraction is not working out. See #164 and whatwg/url#62 for details.
See whatwg/url#62 for the background. This defines a mixin used by both a and area elements to define their IDL members previously defined by the URL standard. It also fixes a small error in the WorkerLocation text.
See whatwg/url#62 for the background. This defines a mixin used by both a and area elements to define their IDL members previously defined by the URL standard. It also fixes a small error in the WorkerLocation text.
This fixes the HTML standard side of these issues: * whatwg/url#61 * whatwg/url#62 There is still some cleanup work left on the URL side, e.g., making sure the basic URL parser returns failure for certain conditions when override state is scheme start state.
This fixes the HTML standard side of these issues: * whatwg/url#61 * whatwg/url#62 There is still some cleanup work left on the URL side, e.g., making sure the basic URL parser returns failure for certain conditions when override state is scheme start state.
See whatwg/url#62 for the background. This defines a mixin used by both a and area elements to define their IDL members previously defined by the URL standard. It also fixes a small error in the WorkerLocation text.
See whatwg/url#62 for the background. This defines a mixin used by both a and area elements to define their IDL members previously defined by the URL standard. It also fixes a small error in the WorkerLocation text.
This fixes the HTML standard side of these issues: * whatwg/url#61 * whatwg/url#62 There is still some cleanup work left on the URL side, e.g., making sure the basic URL parser returns failure for certain conditions when override state is scheme start state.
See whatwg/url#62 for the background. This defines a mixin used by both a and area elements to define their IDL members previously defined by the URL standard. It also fixes a small error in the WorkerLocation text.
This fixes the HTML standard side of these issues: * whatwg/url#61 * whatwg/url#62 There is still some cleanup work left on the URL side, e.g., making sure the basic URL parser returns failure for certain conditions when override state is scheme start state.
Otherwise they do not operate with the latest base URL in mind.
At which point we might want to consider a slightly different design for these that does not involve an internal url. 😟
The text was updated successfully, but these errors were encountered: