Event types and case sensitivity

In the DOM Level 2 Events spec, the description of the type property of
the Event interface says:

    The name of the event (case-insensitive). The name must be an XML name.

Since this is a read-only property, what I need to know is not just that
it is case-insensitive, but what capitalization the returned value
uses.  Is the value all lowercase, all uppercase, mixed case?  As it is,
I can't just use the value of the type property to compare to known
event types.  I must first convert that value to a known
capitalization.  In JavaScript, I'd use code like this:

   if (event.type.toLowerCase() == "mouseup") { ... }

Furthermore, this the only place in the Event spec that says anything
about case-insensitivity.  None of the descriptions of the type argument
to the various init...() methods say that the event type is case
insensitive, and most importantly, the EventTarget.addEventListener()
method does not say anything about the type argument being case
insensitive.  

Am I missing something here?  If the event type is really intended to be
case-insensitive, then I think the spec needs to be clarified in a
number of places.  Otherwise, if it is supposed to be case-sensitive,
then the Event.type description needs to be fixed.

     David Flanagan

Received on Tuesday, 21 August 2001 20:20:17 UTC