Editorial: Define getters for "limited to only known values" attributes more formally#12692
Open
dbaron wants to merge 1 commit into
Open
Editorial: Define getters for "limited to only known values" attributes more formally#12692dbaron wants to merge 1 commit into
dbaron wants to merge 1 commit into
Conversation
…mally. This connects the definitions used by the DOMString and DOMString? IDL getters for enumerated attributes that are "limited to only known values" to the formal "determine the state of an attribute" definition that defines the state of an enumerated attribute. The old wording used vague "corresponds to" wording that seemed to imply a connection to this definition but that wasn't formally connected to it. Fixes whatwg#12688.
lukewarlow
reviewed
Jul 16, 2026
|
|
||
| <li><p>If <var>contentAttributeValue</var> corresponds to a state of | ||
| <var>attributeDefinition</var> with no associated keyword value, then return null.</p></li> | ||
| <li><p>If <var>attributeState</var> is no state, or if <var>attributeState</var> is a state |
Member
There was a problem hiding this comment.
I think the no state part of the condition here is actually a behaviour change in so far as we're not asserting that it matches a state.
Editorially, we require attribute definitions in this scenario has an an invalid value state. Whereas in now we're allowing them not to have one?
lukewarlow
reviewed
Jul 16, 2026
|
|
||
| <div algorithm> | ||
| <p>To determine the state of an attribute, use the following steps:</p> | ||
| <p>To <dfn>determine the state of an attribute</dfn> given an attribute value <var>value</var> and |
Member
There was a problem hiding this comment.
As this now takes an extra argument I would just double check that this algorithm wasn't somehow being used without the linking existing anywhere other than the reflection algorithms that've you touched. (I don't think it is but worth double checking)
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This connects the definitions used by the
DOMStringandDOMString?IDL getters for enumerated attributes that are "limited to only known values" to the formal "determine the state of an attribute" definition that defines the state of an enumerated attribute. The old wording used vague "corresponds to" wording that seemed to imply a connection to this definition but that wasn't formally connected to it.Fixes #12688.
cc @lukewarlow
/common-dom-interfaces.html ( diff )
/common-microsyntaxes.html ( diff )