| OLD | NEW |
| 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 Loading... |
| 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 Loading... |
| 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 } |
| OLD | NEW |