| 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 $LIBRARYNAME; | 5 part of $LIBRARYNAME; |
| 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 735 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 746 /** | 746 /** |
| 747 * Checks to see if the tag name is supported by the current platform. | 747 * Checks to see if the tag name is supported by the current platform. |
| 748 * | 748 * |
| 749 * The tag should be a valid HTML tag name. | 749 * The tag should be a valid HTML tag name. |
| 750 */ | 750 */ |
| 751 static bool isTagSupported(String tag) { | 751 static bool isTagSupported(String tag) { |
| 752 var e = _ElementFactoryProvider.createElement_tag(tag); | 752 var e = _ElementFactoryProvider.createElement_tag(tag); |
| 753 return e is Element && !(e is UnknownElement); | 753 return e is Element && !(e is UnknownElement); |
| 754 } | 754 } |
| 755 | 755 |
| 756 /** |
| 757 * Called by the DOM when this element has been instantiated. |
| 758 */ |
| 759 @Experimental |
| 760 void onCreated() {} |
| 761 |
| 756 // Hooks to support custom WebComponents. | 762 // Hooks to support custom WebComponents. |
| 757 /** | 763 /** |
| 758 * Experimental support for [web components][wc]. This field stores a | 764 * Experimental support for [web components][wc]. This field stores a |
| 759 * reference to the component implementation. It was inspired by Mozilla's | 765 * reference to the component implementation. It was inspired by Mozilla's |
| 760 * [x-tags][] project. Please note: in the future it may be possible to | 766 * [x-tags][] project. Please note: in the future it may be possible to |
| 761 * `extend Element` from your class, in which case this field will be | 767 * `extend Element` from your class, in which case this field will be |
| 762 * deprecated and will simply return this [Element] object. | 768 * deprecated and will simply return this [Element] object. |
| 763 * | 769 * |
| 764 * [wc]: http://dvcs.w3.org/hg/webcomponents/raw-file/tip/explainer/index.html | 770 * [wc]: http://dvcs.w3.org/hg/webcomponents/raw-file/tip/explainer/index.html |
| 765 * [x-tags]: http://x-tags.org/ | 771 * [x-tags]: http://x-tags.org/ |
| (...skipping 270 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1036 // Optimization to improve performance until the dart2js compiler inlines this | 1042 // Optimization to improve performance until the dart2js compiler inlines this |
| 1037 // method. | 1043 // method. |
| 1038 static dynamic createElement_tag(String tag) => | 1044 static dynamic createElement_tag(String tag) => |
| 1039 // Firefox may return a JS function for some types (Embed, Object). | 1045 // Firefox may return a JS function for some types (Embed, Object). |
| 1040 JS('Element|=Object', 'document.createElement(#)', tag); | 1046 JS('Element|=Object', 'document.createElement(#)', tag); |
| 1041 $else | 1047 $else |
| 1042 static Element createElement_tag(String tag) => | 1048 static Element createElement_tag(String tag) => |
| 1043 document.$dom_createElement(tag); | 1049 document.$dom_createElement(tag); |
| 1044 $endif | 1050 $endif |
| 1045 } | 1051 } |
| OLD | NEW |