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