function (/*DomNode*/ container, /*DomNode*/ node, /*Integer*/ offset) (view source)
var atEnd = false;
var offsetAtEnd = (offset == (node.length|| node.childNodes.length));
if(!offsetAtEnd && node.nodeType==3){//if this is a text node, check whether the right part is all spaceif(dojo.trim(node.nodeValue.substr(offset))==0){
offsetAtEnd = true;
}}if(offsetAtEnd){var cnode = node;
atEnd = true;
while(cnode && cnode !== container){if(cnode.nextSibling){
atEnd = false;
break;
}
cnode = cnode.parentNode;
}}return atEnd;