mirror of
https://github.com/servo/servo.git
synced 2025-08-11 08:25:32 +01:00
Auto merge of #8183 - saneyuki:matches, r=nox
script: Element.webkitMatchesSelector()
spec:
- 9ac9c15486
- https://github.com/whatwg/compat/issues/3
<!-- Reviewable:start -->
[<img src="https://reviewable.io/review_button.png" height=40 alt="Review on Reviewable"/>](https://reviewable.io/reviews/servo/servo/8183)
<!-- Reviewable:end -->
This commit is contained in:
commit
47a8256c2c
2 changed files with 7 additions and 0 deletions
|
@ -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);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue