Skip to content
Permalink
Browse files

script: Element.webkitMatchesSelector()

  • Loading branch information
tetsuharuohzeki committed Oct 25, 2015
1 parent bb88832 commit 04967ed97e72b31ee013b4bdb047839a5c68a8b0
Showing with 7 additions and 0 deletions.
  1. +5 −0 components/script/dom/element.rs
  2. +2 −0 components/script/dom/webidls/Element.webidl
@@ -1461,6 +1461,11 @@ impl ElementMethods for Element {
}
}

// https://dom.spec.whatwg.org/#dom-element-webkitmatchesselector
fn WebkitMatchesSelector(&self, selectors: DOMString) -> Fallible<bool> {
self.Matches(selectors)
}

// https://dom.spec.whatwg.org/#dom-element-closest
fn Closest(&self, selectors: DOMString) -> Fallible<Option<Root<Element>>> {
match parse_author_origin_selector_list_from_str(&selectors) {
@@ -55,6 +55,8 @@ interface Element : Node {

[Pure, Throws]
boolean matches(DOMString selectors);
[Pure, Throws]
boolean webkitMatchesSelector(DOMString selectors);

HTMLCollection getElementsByTagName(DOMString localName);
HTMLCollection getElementsByTagNameNS(DOMString? namespace, DOMString localName);

0 comments on commit 04967ed

Please sign in to comment.
You can’t perform that action at this time.