description

# matches method Null safety

bool matches (

1. String selectors

)

Checks if this element matches the CSS selectors.

## Implementation

    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");
      }
    }