Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(63)

Side by Side Diff: tools/dom/templates/html/impl/impl_Element.darttemplate

Issue 12077012: Making Element.matches correctly fail on IE9. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 7 years, 11 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « sdk/lib/html/dart2js/html_dart2js.dart ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file 1 // Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file
2 // for details. All rights reserved. Use of this source code is governed by a 2 // for details. All rights reserved. Use of this source code is governed by a
3 // BSD-style license that can be found in the LICENSE file. 3 // BSD-style license that can be found in the LICENSE file.
4 4
5 part of html; 5 part of html;
6 6
7 // TODO(jacobr): use _Lists.dart to remove some of the duplicated 7 // TODO(jacobr): use _Lists.dart to remove some of the duplicated
8 // functionality. 8 // functionality.
9 class _ChildrenElementList implements List { 9 class _ChildrenElementList implements List {
10 // Raw Element. 10 // Raw Element.
(...skipping 900 matching lines...) Expand 10 before | Expand all | Expand 10 after
911 bool matches(String selectors) { 911 bool matches(String selectors) {
912 if (JS('bool', '!!#.matches', this)) { 912 if (JS('bool', '!!#.matches', this)) {
913 return JS('bool', '#.matches(#)', this, selectors); 913 return JS('bool', '#.matches(#)', this, selectors);
914 } else if (JS('bool', '!!#.webkitMatchesSelector', this)) { 914 } else if (JS('bool', '!!#.webkitMatchesSelector', this)) {
915 return JS('bool', '#.webkitMatchesSelector(#)', this, selectors); 915 return JS('bool', '#.webkitMatchesSelector(#)', this, selectors);
916 } else if (JS('bool', '!!#.mozMatchesSelector', this)) { 916 } else if (JS('bool', '!!#.mozMatchesSelector', this)) {
917 return JS('bool', '#.mozMatchesSelector(#)', this, selectors); 917 return JS('bool', '#.mozMatchesSelector(#)', this, selectors);
918 } else if (JS('bool', '!!#.msMatchesSelector', this)) { 918 } else if (JS('bool', '!!#.msMatchesSelector', this)) {
919 return JS('bool', '#.msMatchesSelector(#)', this, selectors); 919 return JS('bool', '#.msMatchesSelector(#)', this, selectors);
920 } 920 }
921 throw new UnsupportedError("Not supported on this platform");
921 } 922 }
922 923
923 /** 924 /**
924 * Checks if the matches function is supported on the current platform. 925 * Checks if the matches function is supported on the current platform.
925 * 926 *
926 * See also: 927 * See also:
927 * 928 *
928 * * [matches] 929 * * [matches]
929 */ 930 */
930 static bool get supportsMatches { 931 static bool get supportsMatches {
(...skipping 145 matching lines...) Expand 10 before | Expand all | Expand 10 after
1076 $if DART2JS 1077 $if DART2JS
1077 // Optimization to improve performance until the dart2js compiler inlines this 1078 // Optimization to improve performance until the dart2js compiler inlines this
1078 // method. 1079 // method.
1079 static dynamic createElement_tag(String tag) => 1080 static dynamic createElement_tag(String tag) =>
1080 JS('Element', 'document.createElement(#)', tag); 1081 JS('Element', 'document.createElement(#)', tag);
1081 $else 1082 $else
1082 static Element createElement_tag(String tag) => 1083 static Element createElement_tag(String tag) =>
1083 document.$dom_createElement(tag); 1084 document.$dom_createElement(tag);
1084 $endif 1085 $endif
1085 } 1086 }
OLDNEW
« no previous file with comments | « sdk/lib/html/dart2js/html_dart2js.dart ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698