[whatwg] IDL attribute reflecting enumerated attributes not limited to only know values

Mounir Lamouri mounir.lamouri at gmail.com
Fri Aug 6 17:55:22 PDT 2010


On 08/06/2010 09:01 PM, Ian Hickson wrote:
>> - input.autocomplete: at the moment, it is returning the content but it
>> could return the resulting autocompletion state which is maybe a bit
>> more than just being limited to only known values but still in the same
>> spirit.
> 
> I haven't changed this; what's the use case for knowing the actual state?

Theoretically speaking, I think input.autocomplete should return the
current autocompletion state because that would follow the actual idea
of enumerated attributes limited to only known values. Indeed, these
kind of enumerated attributes doesn't return the content value but the
value associated with the current state and in that case the 'state' is
the autocompletion state.

Practical speaking, autocomplete is mostly used in writing (authors want
to force/disable autocomplete) and we can assume that a script reading
this value is going to check if the element have autocompletion. Having
input.autocomplete returning this state may prevent the authors to
repeat the algorithm thus preventing errors and making further changes
in specification easier (and transparent).
By the way, why autocomplete IDL attributes have been introduced in the
specifications?

Thanks,
--
Mounir



More information about the whatwg mailing list