docs: function getDepth(ancestor, descendant) {
        var ret = 0;
        while (descendant !== ancestor) {
            ret++;
            descendant = descendant.parentNode;
            if (!descendant)
                throw new Error("not a descendant of ancestor!");
        }
        return ret;
    }