From 25e5809b1baa8e2ef5ccc87606fc6944f4a153e0 Mon Sep 17 00:00:00 2001
From: Anne van Kesteren Reflected targets have these associated algorithms:
For elements these are defined as follows:
+ For a reflected target that is an element element these are defined as
+ follows: Return element. Let attribute be the result of running get an attribute by namespace and local
- name given null, the reflected content attribute, and the reflected
- target.
+
-
+
If attribute is null, then return null.
Set an attribute value given - the reflected target, the reflected content attribute, and - value. + element, the reflected content attribute, and value.
Remove an attribute by - namespace and local name given null, the reflected content attribute, and the - reflected target.
For a reflected target that is an ElementInternals
object
+ elementInternals these are defined as follows:
Return elementInternals's target + element.
If elementInternals's target element's + native accessibility semantics map[the reflected content attribute] + does not exist, then return null. + +
Return elementInternals's target + element's native accessibility semantics map[the reflected content + attribute].
In general, on getting, if the content attribute is not present, the IDL attribute must act as - if the content attribute's value is the empty string; and on setting, if the content attribute is - not present, it must first be added.
+Set elementInternals's target element's native accessibility semantics + map[the reflected content attribute] to value.
For ElementInternals
objects the content attributes are the keys of their target element's native
- accessibility semantics map. Any manipulation of content attributes as part of the
- reflect algorithms ends up impacting that map accordingly.
Remove elementInternals's target element's native accessibility semantics + map[the reflected content attribute].
This results in somewhat redundant data structures for
ElementInternals
objects as their target
@@ -7648,6 +7673,8 @@ a.setAttribute('href', 'https://example.com/'); // change the content attribute
chosen to make it less error-prone to define IDL attributes shared between reflected targets.
IDL attributes of type DOMString
or DOMString?
that reflect enumerated content attributes can be limited to only known values.
@@ -7662,30 +7689,31 @@ a.setAttribute('href', 'https://example.com/'); // change the content attribute
If the content attribute is an enumerated attribute, and the IDL attribute is - limited to only known values:
+If the attribute defined for the reflected target's get the + element, with namespace null and local name reflected content attribute, + is an enumerated attribute, and the reflected IDL attribute of the + reflected object is limited to only known values:
+If the content attribute is not in any state (e.g., the attribute is missing and there - is no missing value default), or the content attribute - is in a state with no associated keyword value, then return the empty string.
Return the canonical keyword for the state of the content - attribute.
If the reflected target's get the content attribute is not + in any state (e.g., the return value is null and there is no missing value default), or the content attribute is in a state with no + associated keyword value, then return the empty string.
Return the canonical keyword for the state of the reflected + target's get the content attribute.
Otherwise:
- -Return the content attribute's value.
Return the reflected target's get the content + attribute.
The setter steps are to set the content attribute's value to the given value.
The setter steps are to run the reflected target's set the content + attribute with the given value.
If a reflecting IDL attribute has the type