|
Posted by Jeff on 12/19/16 12:00
David Dorward wrote:
> Toby A Inkster wrote:
>> David Dorward wrote:
>
>>> Ironically, while camelCase is the usual JS style, in the case of event
>>> handlers, the DOM methods are lower case.
>> Indeed. IIRC, *all* DOM properties that have a one-to-one mapping to HTML
>> attributes are lower case.
>
> Consistancy would be nice, but sadly ... *.className, meta.httpEquiv,
> body.bgColor, and so on.
I rather like it that way as those generally have dashes where the camel
is.
border-width -> borderWidth
background-color ->backgroundColor
It would be hard to program elsewise.
Jeff
>
>
>
[Back to original message]
|