on the verge of introducing Y-combinator
Jan. 27th, 2015 04:40 pm![[personal profile]](https://www.dreamwidth.org/img/silk/identity/user.png)
isAncestor = function(ancestor) { var check = function(descendant) { var p = descendant && descendant.parentNode return ancestor === p || !!(p && check(p)) }; return check }
isAncestor = function(ancestor) { var check = function(descendant) { var p = descendant && descendant.parentNode return ancestor === p || !!(p && check(p)) }; return check }