diff --git a/source b/source index 8dfc29a8f0b..737fef9a0c5 100644 --- a/source +++ b/source @@ -5430,31 +5430,34 @@ a.setAttribute('href', 'https://example.com/'); // change the content attribute
Multiple keywords can map to the same state.
To determine the state of an attribute, use the following steps:
+To determine the state of an attribute given an attribute value value and + a set of keyword/state mappings and special states defined in the specification + attributeDefinition, use the following steps:
If the attribute is not specified:
+If value is null (meaning the attribute is not specified):
If the attribute has a missing value default - state defined, then return that missing value default - state.
If attributeDefinition has a missing value + default state defined, then return that missing value + default state.
Otherwise, return no state.
If the attribute's value is an ASCII case-insensitive match for one of the - keywords defined for the attribute, then return the state represented by that keyword.
If value is an ASCII case-insensitive match for one of the + keywords defined for the attribute in attributeDefinition, then return the state + represented by that keyword.
If the attribute has an empty value default state - defined and the attribute's value is the empty string, then return that empty value default state.
If attributeDefinition has an empty value + default state defined and value is the empty string, then return that empty value default state.
If the attribute has an invalid value default state - defined, then return that invalid value default - state.
If attributeDefinition has an invalid value + default state defined, then return that invalid value + default state.
Return no state.
If contentAttributeValue does not correspond to any state of - attributeDefinition (e.g., it is null and there is no missing value default), or if it is in a state of - attributeDefinition with no associated keyword value, then return the empty - string.
Return the canonical keyword for the state of - attributeDefinition that contentAttributeValue corresponds to.
Let attributeState be the result of determine the state of an + attribute given contentAttributeValue and + attributeDefinition.
If attributeState is no state (e.g., because the attribute is not present + and there is no missing value default), or if + attributeState is a state of attributeDefinition with no associated + keyword value, then return the empty string.
Return the canonical keyword for attributeState in + attributeDefinition.
Assert: the reflected IDL attribute is limited to only known values.
Assert: contentAttributeValue corresponds to a state of +
Let attributeState be the result of determine the state of an + attribute given contentAttributeValue and attributeDefinition.
If contentAttributeValue corresponds to a state of - attributeDefinition with no associated keyword value, then return null.
If attributeState is no state, or if attributeState is a state + of attributeDefinition with no associated keyword value, then return + null.
Assert: contentAttributeValue is not null.
Return the canonical keyword for the state of - attributeDefinition that contentAttributeValue corresponds to.
Return the canonical keyword for attributeState in + attributeDefinition.