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 681 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
692 } | 692 } |
693 $else | 693 $else |
694 $endif | 694 $endif |
695 | 695 |
696 $!MEMBERS | 696 $!MEMBERS |
697 } | 697 } |
698 | 698 |
699 // Temporary dispatch hook to support WebComponents. | 699 // Temporary dispatch hook to support WebComponents. |
700 Function dynamicUnknownElementDispatcher; | 700 Function dynamicUnknownElementDispatcher; |
701 | 701 |
702 final _START_TAG_REGEXP = const RegExp('<(\\w+)'); | 702 final _START_TAG_REGEXP = new RegExp('<(\\w+)'); |
703 class _ElementFactoryProvider { | 703 class _ElementFactoryProvider { |
704 static final _CUSTOM_PARENT_TAG_MAP = const { | 704 static final _CUSTOM_PARENT_TAG_MAP = const { |
705 'body' : 'html', | 705 'body' : 'html', |
706 'head' : 'html', | 706 'head' : 'html', |
707 'caption' : 'table', | 707 'caption' : 'table', |
708 'td': 'tr', | 708 'td': 'tr', |
709 'colgroup': 'table', | 709 'colgroup': 'table', |
710 'col' : 'colgroup', | 710 'col' : 'colgroup', |
711 'tr' : 'tbody', | 711 'tr' : 'tbody', |
712 'tbody' : 'table', | 712 'tbody' : 'table', |
(...skipping 42 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
755 $if DART2JS | 755 $if DART2JS |
756 // Optimization to improve performance until the dart2js compiler inlines this | 756 // Optimization to improve performance until the dart2js compiler inlines this |
757 // method. | 757 // method. |
758 static Element createElement_tag(String tag) => | 758 static Element createElement_tag(String tag) => |
759 JS('Element', 'document.createElement(#)', tag); | 759 JS('Element', 'document.createElement(#)', tag); |
760 $else | 760 $else |
761 static Element createElement_tag(String tag) => | 761 static Element createElement_tag(String tag) => |
762 document.$dom_createElement(tag); | 762 document.$dom_createElement(tag); |
763 $endif | 763 $endif |
764 } | 764 } |
OLD | NEW |