[whatwg] Why [PutForwards=value] for htmlFor output element attribute ?
Olli.Pettay at helsinki.fi
Thu Apr 8 07:07:39 PDT 2010
On 4/5/10 3:21 PM, Mounir Lamouri wrote:
> I'm wondering why the [PutForwards=value] extended attribute is needed
> for the htmlFor output element attribute ?
> It is making things pretty ugly for a need I do not really get.
I agree. In general PutForwards makes APIs strange, IMO
Location is a good example of a pretty awkward API.
In the case of output element,
element.htmlFor.value = "Something" isn't really
more difficult than element.htmlFor = "something";
Though, .htmlFor accept setting a string value in other
interfacase, but in those cases the type of the attribute
It is a bit ugly that one .htmlFor is DOMSettableTokenList,
but other .htmlFors are DOMStrings
Would be at least great to know some good reasoning for
Btw why doesn't .classList have PutForwards
(in which case it could use DOMSettableTokenList)
More information about the whatwg