| 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 478 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 489 | 489 |
| 490 void writeClasses(Set<String> s) { | 490 void writeClasses(Set<String> s) { |
| 491 List list = new List.from(s); | 491 List list = new List.from(s); |
| 492 _element.$dom_className = s.join(' '); | 492 _element.$dom_className = s.join(' '); |
| 493 } | 493 } |
| 494 } | 494 } |
| 495 | 495 |
| 496 /** | 496 /** |
| 497 * An abstract class, which all HTML elements extend. | 497 * An abstract class, which all HTML elements extend. |
| 498 */ | 498 */ |
| 499 abstract class $CLASSNAME$EXTENDS$IMPLEMENTS$NATIVESPEC { | 499 $(ANNOTATIONS)abstract class $CLASSNAME$EXTENDS$IMPLEMENTS$NATIVESPEC { |
| 500 | 500 |
| 501 /** | 501 /** |
| 502 * Creates an HTML element from a valid fragment of HTML. | 502 * Creates an HTML element from a valid fragment of HTML. |
| 503 * | 503 * |
| 504 * The [html] fragment must represent valid HTML with a single element root, | 504 * The [html] fragment must represent valid HTML with a single element root, |
| 505 * which will be parsed and returned. | 505 * which will be parsed and returned. |
| 506 * | 506 * |
| 507 * Important: the contents of [html] should not contain any user-supplied | 507 * Important: the contents of [html] should not contain any user-supplied |
| 508 * data. Without strict data validation it is impossible to prevent script | 508 * data. Without strict data validation it is impossible to prevent script |
| 509 * injection exploits. | 509 * injection exploits. |
| (...skipping 528 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1038 $if DART2JS | 1038 $if DART2JS |
| 1039 // Optimization to improve performance until the dart2js compiler inlines this | 1039 // Optimization to improve performance until the dart2js compiler inlines this |
| 1040 // method. | 1040 // method. |
| 1041 static dynamic createElement_tag(String tag) => | 1041 static dynamic createElement_tag(String tag) => |
| 1042 JS('Element', 'document.createElement(#)', tag); | 1042 JS('Element', 'document.createElement(#)', tag); |
| 1043 $else | 1043 $else |
| 1044 static Element createElement_tag(String tag) => | 1044 static Element createElement_tag(String tag) => |
| 1045 document.$dom_createElement(tag); | 1045 document.$dom_createElement(tag); |
| 1046 $endif | 1046 $endif |
| 1047 } | 1047 } |
| OLD | NEW |