wood burning stoves 2.0*
The moose likes HTML, CSS and JavaScript and the fly likes why newly the attribute names of newly created DOM nodes are all lowercase? Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


JavaRanch » Java Forums » Engineering » HTML, CSS and JavaScript
Bookmark "why newly the attribute names of newly created DOM nodes are all lowercase? " Watch "why newly the attribute names of newly created DOM nodes are all lowercase? " New topic
Author

why newly the attribute names of newly created DOM nodes are all lowercase?

Chrix Wu
Ranch Hand

Joined: Nov 15, 2009
Posts: 121
I have this problem under Firefox 3.6.17:


var oElem = document.createElement('newElem');
oElem.setAttribute('Name', 'chrix');
console.info(oElem);

the console string is <newelem name="chrix" />

why the element name and the 'name' attribute are all lowercase?


** SCJP 5.0 84% **
** SCWCD 1.5 76% **
Bear Bibeault
Author and ninkuma
Marshal

Joined: Jan 10, 2002
Posts: 61315
    
  66

Why does it matter?


[Asking smart questions] [Bear's FrontMan] [About Bear] [Books by Bear]
Chrix Wu
Ranch Hand

Joined: Nov 15, 2009
Posts: 121
Bear Bibeault wrote:Why does it matter?


if i expect the attribute name to be "Name", but it turns out to be "name", I don't think i can gets the attribute value
 
GeeCON Prague 2014
 
subject: why newly the attribute names of newly created DOM nodes are all lowercase?