- From: David Håsäther <notifications@github.com>
- Date: Wed, 10 Feb 2016 14:19:43 -0800
- To: whatwg/dom <dom@noreply.github.com>
Received on Wednesday, 10 February 2016 22:20:12 UTC
This has been filed as an issue before, but was closed due to lack of interest: https://www.w3.org/Bugs/Public/show_bug.cgi?id=26841 You can always do something like this: ```javascript const closestEle = ele.closest(".blah"); if (containerEle.contains(closestEle)) { ... } ``` This does not have the performance benefits, but I doubt `closest()` being a bottleneck, ever. I'm not really opposed to it though, personally. I use it every time I use event delegation. --- Reply to this email directly or view it on GitHub: https://github.com/whatwg/dom/issues/162#issuecomment-182604595
Received on Wednesday, 10 February 2016 22:20:12 UTC