| 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 class _XMLClassSet extends _CssClassSet { | 5 class _XMLClassSet extends _CssClassSet { |
| 6 _XMLClassSet(element) : super(element); | 6 _XMLClassSet(element) : super(element); |
| 7 | 7 |
| 8 String _className() { | 8 String _className() { |
| 9 final classStr = _element.getAttribute('class'); | 9 final classStr = _element.getAttribute('class'); |
| 10 return classStr == null ? '' : classStr; | 10 return classStr == null ? '' : classStr; |
| (...skipping 139 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 150 if (value) { | 150 if (value) { |
| 151 attributes['hidden'] = ''; | 151 attributes['hidden'] = ''; |
| 152 } else { | 152 } else { |
| 153 attributes.remove('hidden'); | 153 attributes.remove('hidden'); |
| 154 } | 154 } |
| 155 } | 155 } |
| 156 | 156 |
| 157 int get tabIndex() { | 157 int get tabIndex() { |
| 158 try { | 158 try { |
| 159 return Math.parseInt(_attr('tabIndex')); | 159 return Math.parseInt(_attr('tabIndex')); |
| 160 } catch (FormatException e) { | 160 } on FormatException catch (e) { |
| 161 return 0; | 161 return 0; |
| 162 } | 162 } |
| 163 } | 163 } |
| 164 | 164 |
| 165 void set tabIndex(int value) { attributes['tabIndex'] = value.toString(); } | 165 void set tabIndex(int value) { attributes['tabIndex'] = value.toString(); } |
| 166 | 166 |
| 167 String get id() => _attr('id'); | 167 String get id() => _attr('id'); |
| 168 | 168 |
| 169 void set id(String value) { attributes['id'] = value; } | 169 void set id(String value) { attributes['id'] = value; } |
| 170 | 170 |
| (...skipping 11 matching lines...) Expand all Loading... |
| 182 | 182 |
| 183 void set lang(String value) { attributes['lang'] = value; } | 183 void set lang(String value) { attributes['lang'] = value; } |
| 184 | 184 |
| 185 String get dir() => _attr('dir'); | 185 String get dir() => _attr('dir'); |
| 186 | 186 |
| 187 void set dir(String value) { attributes['dir'] = value; } | 187 void set dir(String value) { attributes['dir'] = value; } |
| 188 | 188 |
| 189 String _attr(String name, [String def = '']) => | 189 String _attr(String name, [String def = '']) => |
| 190 attributes.containsKey(name) ? attributes[name] : def; | 190 attributes.containsKey(name) ? attributes[name] : def; |
| 191 } | 191 } |
| OLD | NEW |