| Index: sdk/lib/html/templates/html/impl/impl_Element.darttemplate
|
| diff --git a/sdk/lib/html/templates/html/impl/impl_Element.darttemplate b/sdk/lib/html/templates/html/impl/impl_Element.darttemplate
|
| index fc2bcfb2b97b10c5e790c3be901f5586e85d8d67..d91420ea694ddd6a978e09846e2ab4ff85acc0b5 100644
|
| --- a/sdk/lib/html/templates/html/impl/impl_Element.darttemplate
|
| +++ b/sdk/lib/html/templates/html/impl/impl_Element.darttemplate
|
| @@ -729,6 +729,22 @@ $if DART2JS
|
| throw new ArgumentError("Invalid position ${where}");
|
| }
|
| }
|
| +
|
| + /**
|
| + * Checks if this element matches the CSS selectors.
|
| + */
|
| + @Experimental()
|
| + 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
|
| $endif
|
|
|
|
|