/** * @license * Copyright The Closure Library Authors. * SPDX-License-Identifier: Apache-2.0 */ /** * @fileoverview Defines the TagName class. Its constants enumerate * all HTML tag names specified in either the W3C HTML 4.01 index of elements * or the HTML5.1 specification. * * References: * https://www.w3.org/TR/html401/index/elements.html * https://www.w3.org/TR/html51/dom.html#elements */ /** * A tag name for an HTML element. * * This type is a lie. All instances are actually strings. Do not implement it. * * It exists because we need an object type to host the template type parameter, * and that's not possible with literal or enum types. It is a record type so * that runtime type checks don't try to validate the lie. * * @template T * @interface */ export class TagName { /** * Cast a string into the tagname for the associated constructor. * * @template T * @param {string} name * @param {function(new:T, ...?)} type * @return {!TagName} */ static cast(name: string, type: new (...arg1: unknown[]) => T): TagName; /** * Appease the compiler that instances are stringafiable for the * purpose of being a dictionary key. * * Never implemented; always backed by `String::toString`. * * @override * @return {string} */ toString(): string; } export namespace TagName { const A: TagName; const ABBR: TagName; const ACRONYM: TagName; const ADDRESS: TagName; const APPLET: TagName; const AREA: TagName; const ARTICLE: TagName; const ASIDE: TagName; const AUDIO: TagName; const B: TagName; const BASE: TagName; const BASEFONT: TagName; const BDI: TagName; const BDO: TagName; const BIG: TagName; const BLOCKQUOTE: TagName; const BODY: TagName; const BR: TagName; const BUTTON: TagName; const CANVAS: TagName; const CAPTION: TagName; const CENTER: TagName; const CITE: TagName; const CODE: TagName; const COL: TagName; const COLGROUP: TagName; const COMMAND: TagName; const DATA: TagName; const DATALIST: TagName; const DD: TagName; const DEL: TagName; const DETAILS: TagName; const DFN: TagName; const DIALOG: TagName; const DIR: TagName; const DIV: TagName; const DL: TagName; const DT: TagName; const EM: TagName; const EMBED: TagName; const FIELDSET: TagName; const FIGCAPTION: TagName; const FIGURE: TagName; const FONT: TagName; const FOOTER: TagName; const FORM: TagName; const FRAME: TagName; const FRAMESET: TagName; const H1: TagName; const H2: TagName; const H3: TagName; const H4: TagName; const H5: TagName; const H6: TagName; const HEAD: TagName; const HEADER: TagName; const HGROUP: TagName; const HR: TagName; const HTML: TagName; const I: TagName; const IFRAME: TagName; const IMG: TagName; const INPUT: TagName; const INS: TagName; const ISINDEX: TagName; const KBD: TagName; const KEYGEN: TagName; const LABEL: TagName; const LEGEND: TagName; const LI: TagName; const LINK: TagName; const MAIN: TagName; const MAP: TagName; const MARK: TagName; const MATH: TagName; const MENU: TagName; const MENUITEM: TagName; const META: TagName; const METER: TagName; const NAV: TagName; const NOFRAMES: TagName; const NOSCRIPT: TagName; const OBJECT: TagName; const OL: TagName; const OPTGROUP: TagName; const OPTION: TagName; const OUTPUT: TagName; const P: TagName; const PARAM: TagName; const PICTURE: TagName; const PRE: TagName; const PROGRESS: TagName; const Q: TagName; const RP: TagName; const RT: TagName; const RTC: TagName; const RUBY: TagName; const S: TagName; const SAMP: TagName; const SCRIPT: TagName; const SECTION: TagName; const SELECT: TagName; const SMALL: TagName; const SOURCE: TagName; const SPAN: TagName; const STRIKE: TagName; const STRONG: TagName; const STYLE: TagName; const SUB: TagName; const SUMMARY: TagName; const SUP: TagName; const SVG: TagName; const TABLE: TagName; const TBODY: TagName; const TD: TagName; const TEMPLATE: TagName; const TEXTAREA: TagName; const TFOOT: TagName; const TH: TagName; const THEAD: TagName; const TIME: TagName; const TITLE: TagName; const TR: TagName; const TRACK: TagName; const TT: TagName; const U: TagName; const UL: TagName; const VAR: TagName; const VIDEO: TagName; const WBR: TagName; }