Spec-Zone.ru › Dart 2

dart:html

Метод matches

bool matches(
  1. String selectors
)

Проверяет, соответствует ли этот элемент CSS-селекторам.

Реализация

bool matches(String selectors) {
  if (JS('bool', '!!#.matches', this)) {
    return JS('bool', '#.matches(#)', this, selectors);
  } else if (JS('bool', '!!#.webkitMatchesSelector', this)) {
    return JS('bool', '#.webkitMatchesSelector(#)', this, selectors);
  } else if (JS('bool', '!!#.mozMatchesSelector', this)) {
    return JS('bool', '#.mozMatchesSelector(#)', this, selectors);
  } else if (JS('bool', '!!#.msMatchesSelector', this)) {
    return JS('bool', '#.msMatchesSelector(#)', this, selectors);
  } else if (JS('bool', '!!#.oMatchesSelector', this)) {
    return JS('bool', '#.oMatchesSelector(#)', this, selectors);
  } else {
    throw new UnsupportedError("Not supported on this platform");
  }
}

© 2012 the Dart project authors
Licensed under the BSD 3-Clause "New" or "Revised" License.
https://api.dart.dev/stable/2.18.5/dart-html/Element/matches.html

Spec-Zone.ru

Настройки Оффлайн Что нового Помощь О нас
Spec-Zone .ru
спецификации, руководства, описания, API