This is an archived snapshot of W3C's public bugzilla bug tracker, decommissioned in April 2019. Please see the home page for more details.

Bug 24665 - htmlFor is a "DOMSettableTokenList" interface. Shouldn't it be a "Elements" collection?
Summary: htmlFor is a "DOMSettableTokenList" interface. Shouldn't it be a "Elements" c...
Status: RESOLVED FIXED
Alias: None
Product: WHATWG
Classification: Unclassified
Component: HTML (show other bugs)
Version: unspecified
Hardware: Other other
: P3 normal
Target Milestone: Unsorted
Assignee: Ian 'Hixie' Hickson
QA Contact: contributor
URL: http://www.whatwg.org/specs/web-apps/...
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2014-02-14 19:34 UTC by contributor
Modified: 2014-02-20 21:49 UTC (History)
3 users (show)

See Also:


Attachments

Description contributor 2014-02-14 19:34:33 UTC
Specification: http://www.whatwg.org/specs/web-apps/current-work/multipage/the-button-element.html
Multipage: http://www.whatwg.org/C#the-output-element
Complete: http://www.whatwg.org/c#the-output-element
Referrer: 

Comment:
htmlFor is a "DOMSettableTokenList" interface. Shouldn't it be a "Elements"
collection?

Posted from: 78.13.40.15
User agent: Mozilla/5.0 (Windows NT 6.3; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/32.0.1700.107 Safari/537.36
Comment 1 Ian 'Hixie' Hickson 2014-02-14 21:18:47 UTC
We don't have an existing elaborate interface mechanism for adding and removing elements by reference and having it update a space-separated list of IDs. Developing one just for this obscure feature doesn't seem worth it.
Comment 2 anakin_rendine 2014-02-15 11:16:54 UTC
I thought it would be as easy as creating a reference to a form control from a label using the @for attribute defined on <label>, only with a collection of elements.
Comment 3 Ian 'Hixie' Hickson 2014-02-20 20:47:44 UTC
The difference is that <output for> is a list of IDs, whereas <label for> is just one ID. Also, <label> doesn't have a mutable API for setting the for="" attribute via an element either.
Comment 4 anakin_rendine 2014-02-20 21:49:19 UTC
(In reply to Ian 'Hixie' Hickson from comment #3)
> The difference is that <output for> is a list of IDs, whereas <label for> is
> just one ID. Also, <label> doesn't have a mutable API for setting the for=""
> attribute via an element either.

Mutability IS a serious issue. This solves everything and the fact that the list is anyway available can be exploited somehow. Thank you.