javascriptdomparent-node

Looking for info on old ie5 code node.parentnode.level


Anybody have the slightest clue on what node.parentNode.level is supposed to do or what a replacement would be, I can't seem to find a reference to .level for a parentNode in the DOM specifications. It doesn't work for IE9 or Chrome. But works in IE5 mode. A couple of examples in code if(node.parentNode.level.length==1) in one section and another for node.parentNode.level.split("_"); node in both cases is a div.


Solution

  • I've figured it out, the node was a div and the level was a custom attribute on the Div. To get the value in Chrome I had to use node.parentNode.getAttribute("level").split("_");