Chromium Code Reviews| Index: sdk/lib/html/dartium/html_dartium.dart |
| diff --git a/sdk/lib/html/dartium/html_dartium.dart b/sdk/lib/html/dartium/html_dartium.dart |
| index 5ba612908df728f0553eaaadedae6b6826d5c2db..d4d9bf4900c066cf0b4dad1de48fb6ec69e0c265 100644 |
| --- a/sdk/lib/html/dartium/html_dartium.dart |
| +++ b/sdk/lib/html/dartium/html_dartium.dart |
| @@ -9278,6 +9278,23 @@ abstract class Element extends Node implements ParentNode, ChildNode { |
| } |
| + /** |
| + * Checks if this element matches the CSS selectors. |
| + */ |
| + @Experimental() |
| + bool matches(String selectors) { |
|
blois
2013/08/09 18:38:57
Isn't this JS-specific syntax?
Wasn't this alread
|
| + 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); |
| + } |
| + throw new UnsupportedError("Not supported on this platform"); |
| + } |
| + |
| Element _templateInstanceRef; |
| // Note: only used if `this is! TemplateElement` |
| @@ -25256,13 +25273,13 @@ class Url extends NativeFieldWrapperClass1 { |
| if ((blob_OR_source_OR_stream is Blob || blob_OR_source_OR_stream == null)) { |
| return _createObjectURL_1(blob_OR_source_OR_stream); |
| } |
| - if ((blob_OR_source_OR_stream is MediaStream || blob_OR_source_OR_stream == null)) { |
| + if ((blob_OR_source_OR_stream is MediaSource || blob_OR_source_OR_stream == null)) { |
| return _createObjectURL_2(blob_OR_source_OR_stream); |
| } |
| - if ((blob_OR_source_OR_stream is MediaSource || blob_OR_source_OR_stream == null)) { |
| + if ((blob_OR_source_OR_stream is _WebKitMediaSource || blob_OR_source_OR_stream == null)) { |
| return _createObjectURL_3(blob_OR_source_OR_stream); |
| } |
| - if ((blob_OR_source_OR_stream is _WebKitMediaSource || blob_OR_source_OR_stream == null)) { |
| + if ((blob_OR_source_OR_stream is MediaStream || blob_OR_source_OR_stream == null)) { |
| return _createObjectURL_4(blob_OR_source_OR_stream); |
| } |
| throw new ArgumentError("Incorrect number or type of arguments"); |