function findTrParentNode(node) { if("TR" == node.tagName) { return node; } if(node == null) { return null; } return findTrParentNode(node.parentNode); }
if(node == null) { return null; }
the first one, but apart from that, I'd say it's pretty common code
the first one, but apart from that, I'd say it's pretty common code