dom: implements listAncestor, commonAncestor