Open
Description
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 (edit: it could, by returning null), but .closest would