[dom] Text nodes .closest (#161)

Text nodes have no .closest method, when working with Range, I find useful to do `Text.prototype.closest = function(s) {return this.parentNode.closest(s); } //with this.parentNode&& if we want to be strict` 

For me it makes sense to be able to search from a textnode, .matches wouldn't make sense, but .closest would

---
Reply to this email directly or view it on GitHub:
https://github.com/whatwg/dom/issues/161

Received on Tuesday, 9 February 2016 18:05:09 UTC