Chromium Code Reviews| Index: pkg/polymer/lib/html_element_names.dart |
| diff --git a/pkg/polymer/lib/html_element_names.dart b/pkg/polymer/lib/html_element_names.dart |
| new file mode 100644 |
| index 0000000000000000000000000000000000000000..4c06d574807d5cfb21aff1a013aa3a5e5c35e304 |
| --- /dev/null |
| +++ b/pkg/polymer/lib/html_element_names.dart |
| @@ -0,0 +1,126 @@ |
| +library polymer.html_element_names; |
|
Siggi Cherem (dart-lang)
2014/09/17 20:45:55
+ copyright
jakemac
2014/09/17 21:38:25
Done.
|
| + |
| +/** |
| + * HTML element to DOM type mapping. Source: |
| + * <http://dev.w3.org/html5/spec/section-index.html#element-interfaces> |
| + * |
| + * The 'HTML' prefix has been removed to match `dart:html`, as per: |
| + * <http://code.google.com/p/dart/source/browse/branches/bleeding_edge/dart/lib/html/scripts/htmlrenamer.py> |
| + * It does not appear any element types are being renamed other than the prefix. |
| + * However there does not appear to be the last subtypes for the following tags: |
| + * command, data, dialog, td, th, and time. |
|
Siggi Cherem (dart-lang)
2014/09/17 20:45:55
I just checked, it seems that 'dialog' is ok now,
jakemac
2014/09/17 21:38:25
Done.
|
| + */ |
| +const HTML_ELEMENT_NAMES = const { |
| + 'a': 'AnchorElement', |
| + 'abbr': 'Element', |
| + 'address': 'Element', |
| + 'area': 'AreaElement', |
| + 'article': 'Element', |
| + 'aside': 'Element', |
| + 'audio': 'AudioElement', |
| + 'b': 'Element', |
| + 'base': 'BaseElement', |
| + 'bdi': 'Element', |
| + 'bdo': 'Element', |
| + 'blockquote': 'QuoteElement', |
| + 'body': 'BodyElement', |
| + 'br': 'BRElement', |
| + 'button': 'ButtonElement', |
| + 'canvas': 'CanvasElement', |
| + 'caption': 'TableCaptionElement', |
| + 'cite': 'Element', |
| + 'code': 'Element', |
| + 'col': 'TableColElement', |
| + 'colgroup': 'TableColElement', |
| + 'command': 'Element', // see doc comment, was: 'CommandElement' |
| + 'data': 'Element', // see doc comment, was: 'DataElement' |
| + 'datalist': 'DataListElement', |
| + 'dd': 'Element', |
| + 'del': 'ModElement', |
| + 'details': 'DetailsElement', |
| + 'dfn': 'Element', |
| + 'dialog': 'Element', // see doc comment, was: 'DialogElement' |
|
Siggi Cherem (dart-lang)
2014/09/17 20:45:55
and simply change here to 'DialogElement'
jakemac
2014/09/17 21:38:25
Done.
|
| + 'div': 'DivElement', |
| + 'dl': 'DListElement', |
| + 'dt': 'Element', |
| + 'em': 'Element', |
| + 'embed': 'EmbedElement', |
| + 'fieldset': 'FieldSetElement', |
| + 'figcaption': 'Element', |
| + 'figure': 'Element', |
| + 'footer': 'Element', |
| + 'form': 'FormElement', |
| + 'h1': 'HeadingElement', |
| + 'h2': 'HeadingElement', |
| + 'h3': 'HeadingElement', |
| + 'h4': 'HeadingElement', |
| + 'h5': 'HeadingElement', |
| + 'h6': 'HeadingElement', |
| + 'head': 'HeadElement', |
| + 'header': 'Element', |
| + 'hgroup': 'Element', |
| + 'hr': 'HRElement', |
| + 'html': 'HtmlElement', |
| + 'i': 'Element', |
| + 'iframe': 'IFrameElement', |
| + 'img': 'ImageElement', |
| + 'input': 'InputElement', |
| + 'ins': 'ModElement', |
| + 'kbd': 'Element', |
| + 'keygen': 'KeygenElement', |
| + 'label': 'LabelElement', |
| + 'legend': 'LegendElement', |
| + 'li': 'LIElement', |
| + 'link': 'LinkElement', |
| + 'map': 'MapElement', |
| + 'mark': 'Element', |
| + 'menu': 'MenuElement', |
| + 'meta': 'MetaElement', |
| + 'meter': 'MeterElement', |
| + 'nav': 'Element', |
| + 'noscript': 'Element', |
| + 'object': 'ObjectElement', |
| + 'ol': 'OListElement', |
| + 'optgroup': 'OptGroupElement', |
| + 'option': 'OptionElement', |
| + 'output': 'OutputElement', |
| + 'p': 'ParagraphElement', |
| + 'param': 'ParamElement', |
| + 'pre': 'PreElement', |
| + 'progress': 'ProgressElement', |
| + 'q': 'QuoteElement', |
| + 'rp': 'Element', |
| + 'rt': 'Element', |
| + 'ruby': 'Element', |
| + 's': 'Element', |
| + 'samp': 'Element', |
| + 'script': 'ScriptElement', |
| + 'section': 'Element', |
| + 'select': 'SelectElement', |
| + 'small': 'Element', |
| + 'source': 'SourceElement', |
| + 'span': 'SpanElement', |
| + 'strong': 'Element', |
| + 'style': 'StyleElement', |
| + 'sub': 'Element', |
| + 'summary': 'Element', |
| + 'sup': 'Element', |
| + 'table': 'TableElement', |
| + 'tbody': 'TableSectionElement', |
| + 'td': 'TableCellElement', // see doc comment, was: 'TableDataCellElement' |
| + 'template': 'Element', // should be 'TemplateElement', but it is not yet |
|
Siggi Cherem (dart-lang)
2014/09/17 20:45:55
seems that TemplateElement is in too, let's fix th
jakemac
2014/09/17 21:38:25
Done.
|
| + // in dart:html |
| + 'textarea': 'TextAreaElement', |
| + 'tfoot': 'TableSectionElement', |
| + 'th': 'TableCellElement', // see doc comment, was: 'TableHeaderCellElement' |
| + 'thead': 'TableSectionElement', |
| + 'time': 'Element', // see doc comment, was: 'TimeElement' |
| + 'title': 'TitleElement', |
| + 'tr': 'TableRowElement', |
| + 'track': 'TrackElement', |
| + 'u': 'Element', |
| + 'ul': 'UListElement', |
| + 'var': 'Element', |
| + 'video': 'VideoElement', |
| + 'wbr': 'Element', |
| +}; |