| Index: sdk/lib/html/dart2js/html_dart2js.dart
|
| diff --git a/sdk/lib/html/dart2js/html_dart2js.dart b/sdk/lib/html/dart2js/html_dart2js.dart
|
| index e1340e28788fdb9e9865eb1eb867808bbfe2a2f4..ad2b8914d2f4de463bf6c5ba20c0787dfa20fa9d 100644
|
| --- a/sdk/lib/html/dart2js/html_dart2js.dart
|
| +++ b/sdk/lib/html/dart2js/html_dart2js.dart
|
| @@ -8654,7 +8654,18 @@ abstract class Element extends Node implements ElementTraversal native "*Element
|
|
|
| /**
|
| * Checks if this element matches the CSS selectors.
|
| + *
|
| + * Use [supportsMatches] to check if this is supported on the current
|
| + * platform.
|
| + *
|
| + * See also:
|
| + *
|
| + * * [supportsMatches]
|
| */
|
| + @SupportedBrowser(SupportedBrowser.CHROME)
|
| + @SupportedBrowser(SupportedBrowser.FIREFOX)
|
| + @SupportedBrowser(SupportedBrowser.IE, '10')
|
| + @SupportedBrowser(SupportedBrowser.SAFARI)
|
| @Experimental
|
| bool matches(String selectors) {
|
| if (JS('bool', '!!#.matches', this)) {
|
| @@ -8668,6 +8679,19 @@ abstract class Element extends Node implements ElementTraversal native "*Element
|
| }
|
| }
|
|
|
| + /**
|
| + * Checks if the matches function is supported on the current platform.
|
| + *
|
| + * See also:
|
| + *
|
| + * * [matches]
|
| + */
|
| + static bool get supportsMatches {
|
| + var e = new DivElement();
|
| + return JS('bool', '!!(#.matches || #.webkitMatchesSelector || '
|
| + '#.mozMatchesSelector || #.msMatchesSelector)', e, e, e, e);
|
| + }
|
| +
|
|
|
| @DomName('Element.abort')
|
| @DocsEditable
|
|
|