[dom] element.closest(selector, container) (#162)

It's rare but sometimes you have a reference to a container node, and want to search for the closest element match in this container, adding a second optional parameter may be interesting (either to make sure to limit the search to a subtree, or for performance reasons)

it would just be a second parameter in this function as a stop condition of the for loop
https://code.google.com/p/chromium/codesearch#chromium/src/third_party/WebKit/Source/core/dom/SelectorQuery.cpp&sq=package:chromium&l=157&dr=C&rcl=1455121616


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

Received on Wednesday, 10 February 2016 21:02:57 UTC