diff --git a/source b/source index dd6fd7f9d5d..e3b852a80fb 100644 --- a/source +++ b/source @@ -7312,58 +7312,67 @@ a.setAttribute('href', 'https://example.com/'); // change the content attribute
If a reflecting IDL attribute has the type HTMLElement
,
or an interface that descends from HTMLElement
,
then it must be paired with another reflecting IDL attribute
- that has the type DOMString
.
+ that has the type DOMString?
.
The relationship between these two attributes is as follows:
HTMLElement
should be named attrElement
,
- where the paired DOMString
attribute is named
+ where the paired nullable DOMString
attribute is named
attr
.attr
attribute,
- the IDL attribute must return the value of the content attribute as normal.attr
attribute,
+ the IDL attribute must return the value of the content attribute,
+ or null if the content attribute does not exist on the element.attrElement
attribute,
- it must run the following algorithm
- (stopping at the first point where a value is returned):attr
- is absent, then the IDL attribute attrElement
must return null.document.getElementById()
method
- would find when called on the content attribute's element's node document
- if it were passed as its argument the current value
- of the corresponding content attribute.attrElement
IDL attribute,
+ it must return the value previously set for attrElement
,
+ or null if the value was not previously set or was deleted.
+ attr
attribute,
- the content attribute must be set to the specified value.attrElement
+ should be deleted.
+ id
attribute,
+ the algorithm is terminated.
+ document.getElementById()
method
+ would find when called on the content attribute's element's node tree's
+ root if it were passed as its argument the current value
+ of the corresponding content attribute.attrElement
IDL attribute,
+ store candidate as the value for the
+ attrElement
IDL attribute.
+ attrElement
attribute,
it must run the following algorithm:attr
and return.
+ id
attribute,
and has the same tree as the element of the attribute being set,
and the given element is the first element in that tree
whose ID is the value
of that id
attribute,
- then let id be the value of that id
attribute.
- attr
content attribute to id.
+ then let id be the value of that id
attribute.attr
content attribute to id.If a reflecting IDL attribute has the type sequence<Element>
,
- or sequence<T>
where T descends from Element
...
TODO
-The for
attribute may be specified to indicate a
- form control with which the caption is to be associated. If the attribute is specified, the
- attribute's value must be the ID of a labelable element in the same tree as the
- label
element. If the attribute is specified and there is an
- element in the tree whose ID is equal to the value
- of the for
attribute, and the first such element in
- tree order is a labelable element, then that
- element is the label
element's labeled control.
The htmlForElement
IDL attribute
+ may be specified to indicate a
+ form control with which the caption is to be associated.
+ If the attribute is specified, the attribute's value must be a
+ labelable element.
+
If the for
attribute is not specified, but the
- label
element has a labelable element descendant,
- then the first such descendant in tree order is the label
element's
- labeled control.
If the htmlForElement
IDL attribute is not specified, but
+ the label
element has a labelable element
+ descendant, then the first such descendant in tree order is the label
+ element's labeled control.
The label
element's exact default presentation and behavior, in particular what
its activation behavior might be, if anything, should match the platform's label
@@ -43375,8 +43381,9 @@ interface HTMLLabelElement : HTMLElement {
The htmlFor
IDL attribute must
- reflect the for
content attribute.
The paired htmlFor
and
+ htmlForElement
IDL attributes must
+ reflect the for
content attribute.
The control
IDL attribute must return the
label
element's labeled control, if any, or null if there isn't one.