Implement Element#closest

fixes #4603

- Add definition to the Element.webidl and implementation to element.rs.
- Create inclusive_ancestors helper in NodeHelpers
- Update test expectations
This commit is contained in:
Jim Hoskins 2015-01-12 22:34:17 -08:00
parent 2a9acdcb73
commit 7759358e09
6 changed files with 27 additions and 83 deletions

View file

@ -44,6 +44,9 @@ interface Element : Node {
boolean hasAttribute(DOMString name);
boolean hasAttributeNS(DOMString? namespace, DOMString localName);
[Throws]
Element? closest(DOMString selectors);
[Throws]
boolean matches(DOMString selectors);