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 355 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
366 Map<String, String> attributes = this.attributes; | 366 Map<String, String> attributes = this.attributes; |
367 attributes.clear(); | 367 attributes.clear(); |
368 for (String key in value.keys) { | 368 for (String key in value.keys) { |
369 attributes[key] = value[key]; | 369 attributes[key] = value[key]; |
370 } | 370 } |
371 } | 371 } |
372 | 372 |
373 /** | 373 /** |
374 * Deprecated, use innerHtml instead. | 374 * Deprecated, use innerHtml instead. |
375 */ | 375 */ |
| 376 @deprecated |
376 String get innerHTML => this.innerHtml; | 377 String get innerHTML => this.innerHtml; |
| 378 @deprecated |
377 void set innerHTML(String value) { | 379 void set innerHTML(String value) { |
378 this.innerHtml = value; | 380 this.innerHtml = value; |
379 } | 381 } |
380 | 382 |
| 383 @deprecated |
381 void set elements(Collection<Element> value) { | 384 void set elements(Collection<Element> value) { |
382 this.children = value; | 385 this.children = value; |
383 } | 386 } |
384 | 387 |
385 /** | 388 /** |
386 * Deprecated, use [children] instead. | 389 * Deprecated, use [children] instead. |
387 */ | 390 */ |
| 391 @deprecated |
388 List<Element> get elements => this.children; | 392 List<Element> get elements => this.children; |
389 | 393 |
390 /** | 394 /** |
391 * @domName childElementCount, firstElementChild, lastElementChild, | 395 * @domName childElementCount, firstElementChild, lastElementChild, |
392 * children, Node.nodes.add | 396 * children, Node.nodes.add |
393 */ | 397 */ |
394 List<Element> get children => new _ChildrenElementList._wrap(this); | 398 List<Element> get children => new _ChildrenElementList._wrap(this); |
395 | 399 |
396 void set children(List<Element> value) { | 400 void set children(List<Element> value) { |
397 // Copy list first since we don't want liveness during iteration. | 401 // Copy list first since we don't want liveness during iteration. |
(...skipping 228 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
626 $if DART2JS | 630 $if DART2JS |
627 // Optimization to improve performance until the dart2js compiler inlines this | 631 // Optimization to improve performance until the dart2js compiler inlines this |
628 // method. | 632 // method. |
629 static Element createElement_tag(String tag) => | 633 static Element createElement_tag(String tag) => |
630 JS('Element', 'document.createElement(#)', tag); | 634 JS('Element', 'document.createElement(#)', tag); |
631 $else | 635 $else |
632 static Element createElement_tag(String tag) => | 636 static Element createElement_tag(String tag) => |
633 document.$dom_createElement(tag); | 637 document.$dom_createElement(tag); |
634 $endif | 638 $endif |
635 } | 639 } |
OLD | NEW |