-
Notifications
You must be signed in to change notification settings - Fork 111
Closed
Labels
addition/proposalNew features or enhancementsNew features or enhancementsneeds implementer interestMoving the issue forward requires implementers to express interestMoving the issue forward requires implementers to express interest
Description
What problem are you trying to solve?
As discussed in whatwg/fetch#1867 (comment), it's sometimes helpful (and at least somewhat common practice) to return some prose value from an algorithm that makes the result clear. For example:
- https://fetch.spec.whatwg.org/#cross-origin-resource-policy-check returns "blocked" or "allowed" (as do several algorithms in CSP, SRI, etc).
- Several algorithms in URL, HTML, etc return "failure" (e.g. https://url.spec.whatwg.org/#concept-domain-to-ascii, https://url.spec.whatwg.org/#concept-host-parser, https://html.spec.whatwg.org/#rules-for-parsing-dimension-values, ...).
- WebDriver defines "success" and "error" (https://w3c.github.io/webdriver/#algorithms).
These aren't well-supported by Infra. Perhaps they should be?
What solutions exist today?
No response
How would you solve it?
It seems ideal to agree on some way of representing these kinds of algorithms and their results in Infra.
Based on very little research, I'd suggest that we define "failure" in any event, and consider defining "boolean" algorithms in some way, with a set of truthy values ("Allowed", "Valid", "Success", whatever other common patterns we find) and a set of falsy values ("Blocked", "Invalid", "Failure", etc).
Anything else?
No response
Metadata
Metadata
Assignees
Labels
addition/proposalNew features or enhancementsNew features or enhancementsneeds implementer interestMoving the issue forward requires implementers to express interestMoving the issue forward requires implementers to express interest