Move matches method so that it gets generated for dart2js and dartium.
BUG= Review URL: https://codereview.chromium.org//22755002 git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@25970 260f80e4-7a28-3924-810f-c04153c831b5
This commit is contained in:
@@ -9734,6 +9734,23 @@ abstract class Element extends Node implements ParentNode, ChildNode {
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* 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);
|
||||
}
|
||||
throw new UnsupportedError("Not supported on this platform");
|
||||
}
|
||||
|
||||
Element _templateInstanceRef;
|
||||
|
||||
// Note: only used if `this is! TemplateElement`
|
||||
@@ -25711,13 +25728,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");
|
||||
|
||||
@@ -874,6 +874,7 @@ $if DART2JS
|
||||
throw new ArgumentError("Invalid position ${where}");
|
||||
}
|
||||
}
|
||||
$endif
|
||||
|
||||
/**
|
||||
* Checks if this element matches the CSS selectors.
|
||||
@@ -903,8 +904,6 @@ $if DART2JS
|
||||
} while(includeAncestors && elem != null);
|
||||
return false;
|
||||
}
|
||||
$else
|
||||
$endif
|
||||
|
||||
$if DART2JS
|
||||
@Creates('Null') // Set from Dart code; does not instantiate a native type.
|
||||
|
||||
Reference in New Issue
Block a user