johkar wrote:
I see some people accessing a forms' input type without converting
toLowerCase() and others do. Do some browser's return type as
uppercase?
This
document.forms['myFormName'].elements['myElementName'].type=='select-one';
or this
document.forms['myFormName'].elements['myElementName'].type.toLowerCase()=='select-one';
Somewhat related, what about when tag names and events...does case
matter?
DOM Level 3:
1.3.1 String Comparisons in the DOM
The DOM has many interfaces that imply string matching. For
XML, string comparisons are case-sensitive and performed with a
binary comparison of the 16-bit units of the DOMStrings .
However, for case-insensitive markup languages, such as HTML
4.01 or earlier, these comparisons are case-insensitive where
appropriate.
Note that HTML processors often perform specific case
normalizations (canonicalization) of the markup before the DOM
structures are built. This is typically using uppercase for
element names and lowercase for attribute names. For this
reason, applications should also compare element and attribute
names returned by the DOM implementation in a case-insensitive
manner.
<URL:http://www.w3.org/TR/2004/REC-DOM-Level-3-Core-20040407/core.html#Core-DOMObject>
I think the last sentence is very important to your question.
--
Fred