| 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 433 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 444 | 444 |
| 445 void writeClasses(Set<String> s) { | 445 void writeClasses(Set<String> s) { |
| 446 List list = new List.from(s); | 446 List list = new List.from(s); |
| 447 _element.$dom_className = s.join(' '); | 447 _element.$dom_className = s.join(' '); |
| 448 } | 448 } |
| 449 } | 449 } |
| 450 | 450 |
| 451 /** | 451 /** |
| 452 * An abstract class, which all HTML elements extend. | 452 * An abstract class, which all HTML elements extend. |
| 453 */ | 453 */ |
| 454 $(ANNOTATIONS)abstract class $CLASSNAME$EXTENDS$IMPLEMENTS$NATIVESPEC { | 454 abstract class $CLASSNAME$EXTENDS$IMPLEMENTS$NATIVESPEC { |
| 455 | 455 |
| 456 /** | 456 /** |
| 457 * Creates an HTML element from a valid fragment of HTML. | 457 * Creates an HTML element from a valid fragment of HTML. |
| 458 * | 458 * |
| 459 * The [html] fragment must represent valid HTML with a single element root, | 459 * The [html] fragment must represent valid HTML with a single element root, |
| 460 * which will be parsed and returned. | 460 * which will be parsed and returned. |
| 461 * | 461 * |
| 462 * Important: the contents of [html] should not contain any user-supplied | 462 * Important: the contents of [html] should not contain any user-supplied |
| 463 * data. Without strict data validation it is impossible to prevent script | 463 * data. Without strict data validation it is impossible to prevent script |
| 464 * injection exploits. | 464 * injection exploits. |
| (...skipping 528 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 993 $if DART2JS | 993 $if DART2JS |
| 994 // Optimization to improve performance until the dart2js compiler inlines this | 994 // Optimization to improve performance until the dart2js compiler inlines this |
| 995 // method. | 995 // method. |
| 996 static dynamic createElement_tag(String tag) => | 996 static dynamic createElement_tag(String tag) => |
| 997 JS('Element', 'document.createElement(#)', tag); | 997 JS('Element', 'document.createElement(#)', tag); |
| 998 $else | 998 $else |
| 999 static Element createElement_tag(String tag) => | 999 static Element createElement_tag(String tag) => |
| 1000 document.$dom_createElement(tag); | 1000 document.$dom_createElement(tag); |
| 1001 $endif | 1001 $endif |
| 1002 } | 1002 } |
| OLD | NEW |