├── .gitignore ├── .npmignore ├── .npmrc ├── LICENSE ├── README.md ├── cjs ├── all-names.js ├── all.js ├── data.js ├── index.js ├── names.js └── package.json ├── esm ├── all-names.js ├── all.js ├── data.js ├── index.js └── names.js ├── package.json ├── test ├── index.js ├── package.json ├── puppeteer.js └── retype.js ├── tsconfig.json └── types ├── all-names.d.ts ├── all.d.ts ├── data.d.ts ├── index.d.ts └── names.d.ts /.gitignore: -------------------------------------------------------------------------------- 1 | .DS_Store 2 | .nyc_output 3 | coverage/ 4 | node_modules/ 5 | -------------------------------------------------------------------------------- /.npmignore: -------------------------------------------------------------------------------- 1 | .DS_Store 2 | .nyc_output 3 | .eslintrc.json 4 | .travis.yml 5 | coverage/ 6 | node_modules/ 7 | rollup/ 8 | test/ 9 | tsconfig.json -------------------------------------------------------------------------------- /.npmrc: -------------------------------------------------------------------------------- 1 | package-lock=false 2 | -------------------------------------------------------------------------------- /LICENSE: -------------------------------------------------------------------------------- 1 | ISC License 2 | 3 | Copyright (c) 2023, Andrea Giammarchi, @WebReflection 4 | 5 | Permission to use, copy, modify, and/or distribute this software for any 6 | purpose with or without fee is hereby granted, provided that the above 7 | copyright notice and this permission notice appear in all copies. 8 | 9 | THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH 10 | REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY 11 | AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT, 12 | INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM 13 | LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE 14 | OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR 15 | PERFORMANCE OF THIS SOFTWARE. 16 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # HTML Tags To Constructors 2 | 3 | **Social Media Photo by [Jackson Sophat](https://unsplash.com/@jacksonsophat) on [Unsplash](https://unsplash.com/)** 4 | 5 | This module goal is to relate, through an entirely automated process, [HTML tags names to their constructor](https://developer.mozilla.org/en-US/docs/Web/HTML/Element), also differentiating between the obsolete or deprecated tags and those still vald. 6 | 7 | ```js 8 | // const createHTMLProxy = require('proxied-html-constructors'); 9 | import createHTMLProxy from 'proxied-html-constructors'; 10 | 11 | // the default export is a callback that optionally accepts 12 | // a `globalThis` context to retrieve classes from it. 13 | const HTML = createHTMLProxy(); 14 | 15 | HTML.A; // the HTMLAnchorElement class 16 | HTML.Div; // the HTMLDivElement class 17 | HTML.TD; // the HTMLTableCellElement class 18 | HTML.TH; // also the HTMLTableCellElement class 19 | // ... and so on ... every tag maps to its constructor 20 | ``` 21 | 22 | The extended export that includes deprecated and obsolete tags, hence their constructors, can be reached via `proxied-html-constructors/all` dedicated export. 23 | 24 | ### Constructors just as string 25 | 26 | As classes might not be present in the global context, or simply to facilitate any possible library or tool out there, the `/names` and `/all-names` exports are also available to provide a way to retrieve only fully qualified strings. 27 | 28 | ```js 29 | // const HTML = require('proxied-html-constructors/names'); 30 | import HTML from 'proxied-html-constructors/names'; 31 | 32 | // the default export is a Proxied object that returns names. 33 | 34 | HTML.A; // "HTMLAnchorElement" 35 | HTML.Div; // "HTMLDivElement" 36 | HTML.TD; // "HTMLTableCellElement" 37 | HTML.TH; // "HTMLTableCellElement" 38 | // ... and so on ... every tag maps to its constructor's name 39 | ``` 40 | 41 | ### Just data 42 | 43 | The `/data` export of this module provides an object with *tags* as keys and `deprecated`, `constructor` and `shortcut` fields, respectively a *boolean*, a *string* and also a *string*. 44 | -------------------------------------------------------------------------------- /cjs/all-names.js: -------------------------------------------------------------------------------- 1 | 'use strict'; 2 | /*! (c) Andrea Giammarchi - ISC */ 3 | 4 | // ⚠ THIS FILE IS CREATED VIA AUTOMATION 5 | 6 | const proxiedHTMLConstructors = (m => /* c8 ignore start */ m.__esModule ? m.default : m /* c8 ignore stop */)(require('./all.js')); 7 | 8 | /** 9 | * @typedef {Object} HTML 10 | * @property {"HTMLAnchorElement"} A 11 | * @property {"HTMLElement"} Abbr 12 | * @property {"HTMLElement"} Acronym 13 | * @property {"HTMLElement"} Address 14 | * @property {"HTMLUnknownElement"} Applet 15 | * @property {"HTMLAreaElement"} Area 16 | * @property {"HTMLElement"} Article 17 | * @property {"HTMLElement"} Aside 18 | * @property {"HTMLAudioElement"} Audio 19 | * @property {"HTMLElement"} B 20 | * @property {"HTMLBaseElement"} Base 21 | * @property {"HTMLElement"} Bdi 22 | * @property {"HTMLElement"} Bdo 23 | * @property {"HTMLUnknownElement"} BGSound 24 | * @property {"HTMLElement"} Big 25 | * @property {"HTMLUnknownElement"} Blink 26 | * @property {"HTMLQuoteElement"} BlockQuote 27 | * @property {"HTMLBodyElement"} Body 28 | * @property {"HTMLBRElement"} BR 29 | * @property {"HTMLButtonElement"} Button 30 | * @property {"HTMLCanvasElement"} Canvas 31 | * @property {"HTMLTableCaptionElement"} Caption 32 | * @property {"HTMLElement"} Center 33 | * @property {"HTMLElement"} Cite 34 | * @property {"HTMLElement"} Code 35 | * @property {"HTMLTableColElement"} Col 36 | * @property {"HTMLTableColElement"} ColGroup 37 | * @property {"HTMLUnknownElement"} Content 38 | * @property {"HTMLDataElement"} Data 39 | * @property {"HTMLDataListElement"} DataList 40 | * @property {"HTMLElement"} DD 41 | * @property {"HTMLModElement"} Del 42 | * @property {"HTMLDetailsElement"} Details 43 | * @property {"HTMLElement"} Dfn 44 | * @property {"HTMLDialogElement"} Dialog 45 | * @property {"HTMLDirectoryElement"} Dir 46 | * @property {"HTMLDivElement"} Div 47 | * @property {"HTMLDListElement"} DL 48 | * @property {"HTMLElement"} DT 49 | * @property {"HTMLElement"} Element 50 | * @property {"HTMLElement"} Em 51 | * @property {"HTMLEmbedElement"} Embed 52 | * @property {"HTMLFieldSetElement"} FieldSet 53 | * @property {"HTMLElement"} FigCaption 54 | * @property {"HTMLElement"} Figure 55 | * @property {"HTMLFontElement"} Font 56 | * @property {"HTMLElement"} Footer 57 | * @property {"HTMLFormElement"} Form 58 | * @property {"HTMLFrameElement"} Frame 59 | * @property {"HTMLFrameSetElement"} FrameSet 60 | * @property {"HTMLHeadingElement"} H1 61 | * @property {"HTMLHeadingElement"} H2 62 | * @property {"HTMLHeadingElement"} H3 63 | * @property {"HTMLHeadingElement"} H4 64 | * @property {"HTMLHeadingElement"} H5 65 | * @property {"HTMLHeadingElement"} H6 66 | * @property {"HTMLHeadElement"} Head 67 | * @property {"HTMLElement"} Header 68 | * @property {"HTMLHRElement"} HR 69 | * @property {"HTMLHtmlElement"} Html 70 | * @property {"HTMLElement"} I 71 | * @property {"HTMLIFrameElement"} IFrame 72 | * @property {"HTMLUnknownElement"} Image 73 | * @property {"HTMLImageElement"} Img 74 | * @property {"HTMLInputElement"} Input 75 | * @property {"HTMLModElement"} Ins 76 | * @property {"HTMLElement"} Kbd 77 | * @property {"HTMLUnknownElement"} Keygen 78 | * @property {"HTMLLabelElement"} Label 79 | * @property {"HTMLLegendElement"} Legend 80 | * @property {"HTMLLIElement"} LI 81 | * @property {"HTMLLinkElement"} Link 82 | * @property {"HTMLElement"} Main 83 | * @property {"HTMLMapElement"} Map 84 | * @property {"HTMLElement"} Mark 85 | * @property {"HTMLMarqueeElement"} Marquee 86 | * @property {"HTMLMenuElement"} Menu 87 | * @property {"HTMLUnknownElement"} MenuItem 88 | * @property {"HTMLMetaElement"} Meta 89 | * @property {"HTMLMeterElement"} Meter 90 | * @property {"HTMLElement"} Nav 91 | * @property {"HTMLElement"} NoBR 92 | * @property {"HTMLElement"} NoEmbed 93 | * @property {"HTMLElement"} NoFrames 94 | * @property {"HTMLElement"} NoScript 95 | * @property {"HTMLObjectElement"} Object 96 | * @property {"HTMLOListElement"} OL 97 | * @property {"HTMLOptGroupElement"} OptGroup 98 | * @property {"HTMLOptionElement"} Option 99 | * @property {"HTMLOutputElement"} Output 100 | * @property {"HTMLParagraphElement"} P 101 | * @property {"HTMLParamElement"} Param 102 | * @property {"HTMLPictureElement"} Picture 103 | * @property {"HTMLElement"} PlainText 104 | * @property {"HTMLUnknownElement"} Portal 105 | * @property {"HTMLPreElement"} Pre 106 | * @property {"HTMLProgressElement"} Progress 107 | * @property {"HTMLQuoteElement"} Q 108 | * @property {"HTMLElement"} RB 109 | * @property {"HTMLElement"} RP 110 | * @property {"HTMLElement"} RT 111 | * @property {"HTMLElement"} RTC 112 | * @property {"HTMLElement"} Ruby 113 | * @property {"HTMLElement"} S 114 | * @property {"HTMLElement"} Samp 115 | * @property {"HTMLScriptElement"} Script 116 | * @property {"HTMLElement"} Section 117 | * @property {"HTMLSelectElement"} Select 118 | * @property {"HTMLUnknownElement"} Shadow 119 | * @property {"HTMLSlotElement"} Slot 120 | * @property {"HTMLElement"} Small 121 | * @property {"HTMLSourceElement"} Source 122 | * @property {"HTMLUnknownElement"} Spacer 123 | * @property {"HTMLSpanElement"} Span 124 | * @property {"HTMLElement"} Strike 125 | * @property {"HTMLElement"} Strong 126 | * @property {"HTMLStyleElement"} Style 127 | * @property {"HTMLElement"} Sub 128 | * @property {"HTMLElement"} Summary 129 | * @property {"HTMLElement"} Sup 130 | * @property {"HTMLTableElement"} Table 131 | * @property {"HTMLTableSectionElement"} TBody 132 | * @property {"HTMLTableCellElement"} TD 133 | * @property {"HTMLTemplateElement"} Template 134 | * @property {"HTMLTextAreaElement"} TextArea 135 | * @property {"HTMLTableSectionElement"} TFoot 136 | * @property {"HTMLTableCellElement"} TH 137 | * @property {"HTMLTableSectionElement"} THead 138 | * @property {"HTMLTimeElement"} Time 139 | * @property {"HTMLTitleElement"} Title 140 | * @property {"HTMLTableRowElement"} TR 141 | * @property {"HTMLTrackElement"} Track 142 | * @property {"HTMLElement"} TT 143 | * @property {"HTMLElement"} U 144 | * @property {"HTMLUListElement"} UL 145 | * @property {"HTMLElement"} Var 146 | * @property {"HTMLVideoElement"} Video 147 | * @property {"HTMLElement"} Wbr 148 | * @property {"HTMLPreElement"} XMP 149 | */ 150 | 151 | const handler = {get: (_, name) => name}; 152 | 153 | /** @type {HTML} */ 154 | module.exports = proxiedHTMLConstructors(new Proxy(handler, handler)); 155 | -------------------------------------------------------------------------------- /cjs/all.js: -------------------------------------------------------------------------------- 1 | 'use strict'; 2 | /*! (c) Andrea Giammarchi - ISC */ 3 | 4 | // ⚠ THIS FILE IS CREATED VIA AUTOMATION 5 | 6 | /** 7 | * @typedef {Object} HTML 8 | * @property {new () => HTMLAnchorElement} A 9 | * @property {new () => HTMLElement} Abbr 10 | * @property {new () => HTMLElement} Acronym 11 | * @property {new () => HTMLElement} Address 12 | * @property {new () => HTMLUnknownElement} Applet 13 | * @property {new () => HTMLAreaElement} Area 14 | * @property {new () => HTMLElement} Article 15 | * @property {new () => HTMLElement} Aside 16 | * @property {new () => HTMLAudioElement} Audio 17 | * @property {new () => HTMLElement} B 18 | * @property {new () => HTMLBaseElement} Base 19 | * @property {new () => HTMLElement} Bdi 20 | * @property {new () => HTMLElement} Bdo 21 | * @property {new () => HTMLUnknownElement} BGSound 22 | * @property {new () => HTMLElement} Big 23 | * @property {new () => HTMLUnknownElement} Blink 24 | * @property {new () => HTMLQuoteElement} BlockQuote 25 | * @property {new () => HTMLBodyElement} Body 26 | * @property {new () => HTMLBRElement} BR 27 | * @property {new () => HTMLButtonElement} Button 28 | * @property {new () => HTMLCanvasElement} Canvas 29 | * @property {new () => HTMLTableCaptionElement} Caption 30 | * @property {new () => HTMLElement} Center 31 | * @property {new () => HTMLElement} Cite 32 | * @property {new () => HTMLElement} Code 33 | * @property {new () => HTMLTableColElement} Col 34 | * @property {new () => HTMLTableColElement} ColGroup 35 | * @property {new () => HTMLUnknownElement} Content 36 | * @property {new () => HTMLDataElement} Data 37 | * @property {new () => HTMLDataListElement} DataList 38 | * @property {new () => HTMLElement} DD 39 | * @property {new () => HTMLModElement} Del 40 | * @property {new () => HTMLDetailsElement} Details 41 | * @property {new () => HTMLElement} Dfn 42 | * @property {new () => HTMLDialogElement} Dialog 43 | * @property {new () => HTMLDirectoryElement} Dir 44 | * @property {new () => HTMLDivElement} Div 45 | * @property {new () => HTMLDListElement} DL 46 | * @property {new () => HTMLElement} DT 47 | * @property {new () => HTMLElement} Element 48 | * @property {new () => HTMLElement} Em 49 | * @property {new () => HTMLEmbedElement} Embed 50 | * @property {new () => HTMLFieldSetElement} FieldSet 51 | * @property {new () => HTMLElement} FigCaption 52 | * @property {new () => HTMLElement} Figure 53 | * @property {new () => HTMLFontElement} Font 54 | * @property {new () => HTMLElement} Footer 55 | * @property {new () => HTMLFormElement} Form 56 | * @property {new () => HTMLFrameElement} Frame 57 | * @property {new () => HTMLFrameSetElement} FrameSet 58 | * @property {new () => HTMLHeadingElement} H1 59 | * @property {new () => HTMLHeadingElement} H2 60 | * @property {new () => HTMLHeadingElement} H3 61 | * @property {new () => HTMLHeadingElement} H4 62 | * @property {new () => HTMLHeadingElement} H5 63 | * @property {new () => HTMLHeadingElement} H6 64 | * @property {new () => HTMLHeadElement} Head 65 | * @property {new () => HTMLElement} Header 66 | * @property {new () => HTMLHRElement} HR 67 | * @property {new () => HTMLHtmlElement} Html 68 | * @property {new () => HTMLElement} I 69 | * @property {new () => HTMLIFrameElement} IFrame 70 | * @property {new () => HTMLUnknownElement} Image 71 | * @property {new () => HTMLImageElement} Img 72 | * @property {new () => HTMLInputElement} Input 73 | * @property {new () => HTMLModElement} Ins 74 | * @property {new () => HTMLElement} Kbd 75 | * @property {new () => HTMLUnknownElement} Keygen 76 | * @property {new () => HTMLLabelElement} Label 77 | * @property {new () => HTMLLegendElement} Legend 78 | * @property {new () => HTMLLIElement} LI 79 | * @property {new () => HTMLLinkElement} Link 80 | * @property {new () => HTMLElement} Main 81 | * @property {new () => HTMLMapElement} Map 82 | * @property {new () => HTMLElement} Mark 83 | * @property {new () => HTMLMarqueeElement} Marquee 84 | * @property {new () => HTMLMenuElement} Menu 85 | * @property {new () => HTMLUnknownElement} MenuItem 86 | * @property {new () => HTMLMetaElement} Meta 87 | * @property {new () => HTMLMeterElement} Meter 88 | * @property {new () => HTMLElement} Nav 89 | * @property {new () => HTMLElement} NoBR 90 | * @property {new () => HTMLElement} NoEmbed 91 | * @property {new () => HTMLElement} NoFrames 92 | * @property {new () => HTMLElement} NoScript 93 | * @property {new () => HTMLObjectElement} Object 94 | * @property {new () => HTMLOListElement} OL 95 | * @property {new () => HTMLOptGroupElement} OptGroup 96 | * @property {new () => HTMLOptionElement} Option 97 | * @property {new () => HTMLOutputElement} Output 98 | * @property {new () => HTMLParagraphElement} P 99 | * @property {new () => HTMLParamElement} Param 100 | * @property {new () => HTMLPictureElement} Picture 101 | * @property {new () => HTMLElement} PlainText 102 | * @property {new () => HTMLUnknownElement} Portal 103 | * @property {new () => HTMLPreElement} Pre 104 | * @property {new () => HTMLProgressElement} Progress 105 | * @property {new () => HTMLQuoteElement} Q 106 | * @property {new () => HTMLElement} RB 107 | * @property {new () => HTMLElement} RP 108 | * @property {new () => HTMLElement} RT 109 | * @property {new () => HTMLElement} RTC 110 | * @property {new () => HTMLElement} Ruby 111 | * @property {new () => HTMLElement} S 112 | * @property {new () => HTMLElement} Samp 113 | * @property {new () => HTMLScriptElement} Script 114 | * @property {new () => HTMLElement} Section 115 | * @property {new () => HTMLSelectElement} Select 116 | * @property {new () => HTMLUnknownElement} Shadow 117 | * @property {new () => HTMLSlotElement} Slot 118 | * @property {new () => HTMLElement} Small 119 | * @property {new () => HTMLSourceElement} Source 120 | * @property {new () => HTMLUnknownElement} Spacer 121 | * @property {new () => HTMLSpanElement} Span 122 | * @property {new () => HTMLElement} Strike 123 | * @property {new () => HTMLElement} Strong 124 | * @property {new () => HTMLStyleElement} Style 125 | * @property {new () => HTMLElement} Sub 126 | * @property {new () => HTMLElement} Summary 127 | * @property {new () => HTMLElement} Sup 128 | * @property {new () => HTMLTableElement} Table 129 | * @property {new () => HTMLTableSectionElement} TBody 130 | * @property {new () => HTMLTableCellElement} TD 131 | * @property {new () => HTMLTemplateElement} Template 132 | * @property {new () => HTMLTextAreaElement} TextArea 133 | * @property {new () => HTMLTableSectionElement} TFoot 134 | * @property {new () => HTMLTableCellElement} TH 135 | * @property {new () => HTMLTableSectionElement} THead 136 | * @property {new () => HTMLTimeElement} Time 137 | * @property {new () => HTMLTitleElement} Title 138 | * @property {new () => HTMLTableRowElement} TR 139 | * @property {new () => HTMLTrackElement} Track 140 | * @property {new () => HTMLElement} TT 141 | * @property {new () => HTMLElement} U 142 | * @property {new () => HTMLUListElement} UL 143 | * @property {new () => HTMLElement} Var 144 | * @property {new () => HTMLVideoElement} Video 145 | * @property {new () => HTMLElement} Wbr 146 | * @property {new () => HTMLPreElement} XMP 147 | */ 148 | 149 | const Anchor = "Anchor"; 150 | const Element = "Element"; 151 | const Unknown = "Unknown"; 152 | const Quote = "Quote"; 153 | const TableCaption = "TableCaption"; 154 | const TableCol = "TableCol"; 155 | const Mod = "Mod"; 156 | const Directory = "Directory"; 157 | const DList = "DList"; 158 | const Heading = "Heading"; 159 | const Image = "Image"; 160 | const OList = "OList"; 161 | const Paragraph = "Paragraph"; 162 | const TableSection = "TableSection"; 163 | const TableCell = "TableCell"; 164 | const TableRow = "TableRow"; 165 | const UList = "UList"; 166 | const Pre = "Pre"; 167 | 168 | /** 169 | * Given an optional global context, returns a proxy that resolves 170 | * all tag names into their global constructors. 171 | * @property {globalThis} [self=globalThis] 172 | * @returns {HTML} 173 | */ 174 | module.exports = (self = globalThis) => new Proxy( 175 | new Map([ 176 | ["a", Anchor], 177 | ["abbr", Element], 178 | ["acronym", Element], 179 | ["address", Element], 180 | ["applet", Unknown], 181 | ["article", Element], 182 | ["aside", Element], 183 | ["b", Element], 184 | ["bdi", Element], 185 | ["bdo", Element], 186 | ["bgsound", Unknown], 187 | ["big", Element], 188 | ["blink", Unknown], 189 | ["blockquote", Quote], 190 | ["caption", TableCaption], 191 | ["center", Element], 192 | ["cite", Element], 193 | ["code", Element], 194 | ["col", TableCol], 195 | ["colgroup", TableCol], 196 | ["content", Unknown], 197 | ["dd", Element], 198 | ["del", Mod], 199 | ["dfn", Element], 200 | ["dir", Directory], 201 | ["dl", DList], 202 | ["dt", Element], 203 | ["em", Element], 204 | ["figcaption", Element], 205 | ["figure", Element], 206 | ["footer", Element], 207 | ["h1", Heading], 208 | ["h2", Heading], 209 | ["h3", Heading], 210 | ["h4", Heading], 211 | ["h5", Heading], 212 | ["h6", Heading], 213 | ["header", Element], 214 | ["i", Element], 215 | ["image", Unknown], 216 | ["img", Image], 217 | ["ins", Mod], 218 | ["kbd", Element], 219 | ["keygen", Unknown], 220 | ["main", Element], 221 | ["mark", Element], 222 | ["menuitem", Unknown], 223 | ["nav", Element], 224 | ["nobr", Element], 225 | ["noembed", Element], 226 | ["noframes", Element], 227 | ["noscript", Element], 228 | ["ol", OList], 229 | ["p", Paragraph], 230 | ["plaintext", Element], 231 | ["portal", Unknown], 232 | ["q", Quote], 233 | ["rb", Element], 234 | ["rp", Element], 235 | ["rt", Element], 236 | ["rtc", Element], 237 | ["ruby", Element], 238 | ["s", Element], 239 | ["samp", Element], 240 | ["section", Element], 241 | ["shadow", Unknown], 242 | ["small", Element], 243 | ["spacer", Unknown], 244 | ["strike", Element], 245 | ["strong", Element], 246 | ["sub", Element], 247 | ["summary", Element], 248 | ["sup", Element], 249 | ["tbody", TableSection], 250 | ["td", TableCell], 251 | ["tfoot", TableSection], 252 | ["th", TableCell], 253 | ["thead", TableSection], 254 | ["tr", TableRow], 255 | ["tt", Element], 256 | ["u", Element], 257 | ["ul", UList], 258 | ["var", Element], 259 | ["wbr", Element], 260 | ["xmp", Pre] 261 | ]), 262 | { 263 | get(tags, name) { 264 | const Class = tags.get(name.toLowerCase()) || (name === Element ? '' : name); 265 | return self['HTML' + Class + Element]; 266 | } 267 | } 268 | ); 269 | -------------------------------------------------------------------------------- /cjs/data.js: -------------------------------------------------------------------------------- 1 | 'use strict'; 2 | module.exports = ({ 3 | "a": { 4 | "deprecated": false, 5 | "constructor": "HTMLAnchorElement", 6 | "shortcut": "A" 7 | }, 8 | "abbr": { 9 | "deprecated": false, 10 | "constructor": "HTMLElement", 11 | "shortcut": "Abbr" 12 | }, 13 | "acronym": { 14 | "deprecated": true, 15 | "constructor": "HTMLElement", 16 | "shortcut": "Acronym" 17 | }, 18 | "address": { 19 | "deprecated": false, 20 | "constructor": "HTMLElement", 21 | "shortcut": "Address" 22 | }, 23 | "applet": { 24 | "deprecated": true, 25 | "constructor": "HTMLUnknownElement", 26 | "shortcut": "Applet" 27 | }, 28 | "area": { 29 | "deprecated": false, 30 | "constructor": "HTMLAreaElement", 31 | "shortcut": "Area" 32 | }, 33 | "article": { 34 | "deprecated": false, 35 | "constructor": "HTMLElement", 36 | "shortcut": "Article" 37 | }, 38 | "aside": { 39 | "deprecated": false, 40 | "constructor": "HTMLElement", 41 | "shortcut": "Aside" 42 | }, 43 | "audio": { 44 | "deprecated": false, 45 | "constructor": "HTMLAudioElement", 46 | "shortcut": "Audio" 47 | }, 48 | "b": { 49 | "deprecated": false, 50 | "constructor": "HTMLElement", 51 | "shortcut": "B" 52 | }, 53 | "base": { 54 | "deprecated": false, 55 | "constructor": "HTMLBaseElement", 56 | "shortcut": "Base" 57 | }, 58 | "bdi": { 59 | "deprecated": false, 60 | "constructor": "HTMLElement", 61 | "shortcut": "Bdi" 62 | }, 63 | "bdo": { 64 | "deprecated": false, 65 | "constructor": "HTMLElement", 66 | "shortcut": "Bdo" 67 | }, 68 | "bgsound": { 69 | "deprecated": true, 70 | "constructor": "HTMLUnknownElement", 71 | "shortcut": "BGSound" 72 | }, 73 | "big": { 74 | "deprecated": true, 75 | "constructor": "HTMLElement", 76 | "shortcut": "Big" 77 | }, 78 | "blink": { 79 | "deprecated": true, 80 | "constructor": "HTMLUnknownElement", 81 | "shortcut": "Blink" 82 | }, 83 | "blockquote": { 84 | "deprecated": false, 85 | "constructor": "HTMLQuoteElement", 86 | "shortcut": "BlockQuote" 87 | }, 88 | "body": { 89 | "deprecated": false, 90 | "constructor": "HTMLBodyElement", 91 | "shortcut": "Body" 92 | }, 93 | "br": { 94 | "deprecated": false, 95 | "constructor": "HTMLBRElement", 96 | "shortcut": "BR" 97 | }, 98 | "button": { 99 | "deprecated": false, 100 | "constructor": "HTMLButtonElement", 101 | "shortcut": "Button" 102 | }, 103 | "canvas": { 104 | "deprecated": false, 105 | "constructor": "HTMLCanvasElement", 106 | "shortcut": "Canvas" 107 | }, 108 | "caption": { 109 | "deprecated": false, 110 | "constructor": "HTMLTableCaptionElement", 111 | "shortcut": "Caption" 112 | }, 113 | "center": { 114 | "deprecated": true, 115 | "constructor": "HTMLElement", 116 | "shortcut": "Center" 117 | }, 118 | "cite": { 119 | "deprecated": false, 120 | "constructor": "HTMLElement", 121 | "shortcut": "Cite" 122 | }, 123 | "code": { 124 | "deprecated": false, 125 | "constructor": "HTMLElement", 126 | "shortcut": "Code" 127 | }, 128 | "col": { 129 | "deprecated": false, 130 | "constructor": "HTMLTableColElement", 131 | "shortcut": "Col" 132 | }, 133 | "colgroup": { 134 | "deprecated": false, 135 | "constructor": "HTMLTableColElement", 136 | "shortcut": "ColGroup" 137 | }, 138 | "content": { 139 | "deprecated": true, 140 | "constructor": "HTMLUnknownElement", 141 | "shortcut": "Content" 142 | }, 143 | "data": { 144 | "deprecated": false, 145 | "constructor": "HTMLDataElement", 146 | "shortcut": "Data" 147 | }, 148 | "datalist": { 149 | "deprecated": false, 150 | "constructor": "HTMLDataListElement", 151 | "shortcut": "DataList" 152 | }, 153 | "dd": { 154 | "deprecated": false, 155 | "constructor": "HTMLElement", 156 | "shortcut": "DD" 157 | }, 158 | "del": { 159 | "deprecated": false, 160 | "constructor": "HTMLModElement", 161 | "shortcut": "Del" 162 | }, 163 | "details": { 164 | "deprecated": false, 165 | "constructor": "HTMLDetailsElement", 166 | "shortcut": "Details" 167 | }, 168 | "dfn": { 169 | "deprecated": false, 170 | "constructor": "HTMLElement", 171 | "shortcut": "Dfn" 172 | }, 173 | "dialog": { 174 | "deprecated": false, 175 | "constructor": "HTMLDialogElement", 176 | "shortcut": "Dialog" 177 | }, 178 | "dir": { 179 | "deprecated": true, 180 | "constructor": "HTMLDirectoryElement", 181 | "shortcut": "Dir" 182 | }, 183 | "div": { 184 | "deprecated": false, 185 | "constructor": "HTMLDivElement", 186 | "shortcut": "Div" 187 | }, 188 | "dl": { 189 | "deprecated": false, 190 | "constructor": "HTMLDListElement", 191 | "shortcut": "DL" 192 | }, 193 | "dt": { 194 | "deprecated": false, 195 | "constructor": "HTMLElement", 196 | "shortcut": "DT" 197 | }, 198 | "element": { 199 | "deprecated": false, 200 | "constructor": "HTMLElement", 201 | "shortcut": "Element" 202 | }, 203 | "em": { 204 | "deprecated": false, 205 | "constructor": "HTMLElement", 206 | "shortcut": "Em" 207 | }, 208 | "embed": { 209 | "deprecated": false, 210 | "constructor": "HTMLEmbedElement", 211 | "shortcut": "Embed" 212 | }, 213 | "fieldset": { 214 | "deprecated": false, 215 | "constructor": "HTMLFieldSetElement", 216 | "shortcut": "FieldSet" 217 | }, 218 | "figcaption": { 219 | "deprecated": false, 220 | "constructor": "HTMLElement", 221 | "shortcut": "FigCaption" 222 | }, 223 | "figure": { 224 | "deprecated": false, 225 | "constructor": "HTMLElement", 226 | "shortcut": "Figure" 227 | }, 228 | "font": { 229 | "deprecated": true, 230 | "constructor": "HTMLFontElement", 231 | "shortcut": "Font" 232 | }, 233 | "footer": { 234 | "deprecated": false, 235 | "constructor": "HTMLElement", 236 | "shortcut": "Footer" 237 | }, 238 | "form": { 239 | "deprecated": false, 240 | "constructor": "HTMLFormElement", 241 | "shortcut": "Form" 242 | }, 243 | "frame": { 244 | "deprecated": true, 245 | "constructor": "HTMLFrameElement", 246 | "shortcut": "Frame" 247 | }, 248 | "frameset": { 249 | "deprecated": true, 250 | "constructor": "HTMLFrameSetElement", 251 | "shortcut": "FrameSet" 252 | }, 253 | "h1": { 254 | "deprecated": false, 255 | "constructor": "HTMLHeadingElement", 256 | "shortcut": "H1" 257 | }, 258 | "h2": { 259 | "deprecated": false, 260 | "constructor": "HTMLHeadingElement", 261 | "shortcut": "H2" 262 | }, 263 | "h3": { 264 | "deprecated": false, 265 | "constructor": "HTMLHeadingElement", 266 | "shortcut": "H3" 267 | }, 268 | "h4": { 269 | "deprecated": false, 270 | "constructor": "HTMLHeadingElement", 271 | "shortcut": "H4" 272 | }, 273 | "h5": { 274 | "deprecated": false, 275 | "constructor": "HTMLHeadingElement", 276 | "shortcut": "H5" 277 | }, 278 | "h6": { 279 | "deprecated": false, 280 | "constructor": "HTMLHeadingElement", 281 | "shortcut": "H6" 282 | }, 283 | "head": { 284 | "deprecated": false, 285 | "constructor": "HTMLHeadElement", 286 | "shortcut": "Head" 287 | }, 288 | "header": { 289 | "deprecated": false, 290 | "constructor": "HTMLElement", 291 | "shortcut": "Header" 292 | }, 293 | "hr": { 294 | "deprecated": false, 295 | "constructor": "HTMLHRElement", 296 | "shortcut": "HR" 297 | }, 298 | "html": { 299 | "deprecated": false, 300 | "constructor": "HTMLHtmlElement", 301 | "shortcut": "Html" 302 | }, 303 | "i": { 304 | "deprecated": false, 305 | "constructor": "HTMLElement", 306 | "shortcut": "I" 307 | }, 308 | "iframe": { 309 | "deprecated": false, 310 | "constructor": "HTMLIFrameElement", 311 | "shortcut": "IFrame" 312 | }, 313 | "image": { 314 | "deprecated": true, 315 | "constructor": "HTMLUnknownElement", 316 | "shortcut": "Image" 317 | }, 318 | "img": { 319 | "deprecated": false, 320 | "constructor": "HTMLImageElement", 321 | "shortcut": "Img" 322 | }, 323 | "input": { 324 | "deprecated": false, 325 | "constructor": "HTMLInputElement", 326 | "shortcut": "Input" 327 | }, 328 | "ins": { 329 | "deprecated": false, 330 | "constructor": "HTMLModElement", 331 | "shortcut": "Ins" 332 | }, 333 | "kbd": { 334 | "deprecated": false, 335 | "constructor": "HTMLElement", 336 | "shortcut": "Kbd" 337 | }, 338 | "keygen": { 339 | "deprecated": true, 340 | "constructor": "HTMLUnknownElement", 341 | "shortcut": "Keygen" 342 | }, 343 | "label": { 344 | "deprecated": false, 345 | "constructor": "HTMLLabelElement", 346 | "shortcut": "Label" 347 | }, 348 | "legend": { 349 | "deprecated": false, 350 | "constructor": "HTMLLegendElement", 351 | "shortcut": "Legend" 352 | }, 353 | "li": { 354 | "deprecated": false, 355 | "constructor": "HTMLLIElement", 356 | "shortcut": "LI" 357 | }, 358 | "link": { 359 | "deprecated": false, 360 | "constructor": "HTMLLinkElement", 361 | "shortcut": "Link" 362 | }, 363 | "main": { 364 | "deprecated": false, 365 | "constructor": "HTMLElement", 366 | "shortcut": "Main" 367 | }, 368 | "map": { 369 | "deprecated": false, 370 | "constructor": "HTMLMapElement", 371 | "shortcut": "Map" 372 | }, 373 | "mark": { 374 | "deprecated": false, 375 | "constructor": "HTMLElement", 376 | "shortcut": "Mark" 377 | }, 378 | "marquee": { 379 | "deprecated": true, 380 | "constructor": "HTMLMarqueeElement", 381 | "shortcut": "Marquee" 382 | }, 383 | "menu": { 384 | "deprecated": false, 385 | "constructor": "HTMLMenuElement", 386 | "shortcut": "Menu" 387 | }, 388 | "menuitem": { 389 | "deprecated": true, 390 | "constructor": "HTMLUnknownElement", 391 | "shortcut": "MenuItem" 392 | }, 393 | "meta": { 394 | "deprecated": false, 395 | "constructor": "HTMLMetaElement", 396 | "shortcut": "Meta" 397 | }, 398 | "meter": { 399 | "deprecated": false, 400 | "constructor": "HTMLMeterElement", 401 | "shortcut": "Meter" 402 | }, 403 | "nav": { 404 | "deprecated": false, 405 | "constructor": "HTMLElement", 406 | "shortcut": "Nav" 407 | }, 408 | "nobr": { 409 | "deprecated": true, 410 | "constructor": "HTMLElement", 411 | "shortcut": "NoBR" 412 | }, 413 | "noembed": { 414 | "deprecated": true, 415 | "constructor": "HTMLElement", 416 | "shortcut": "NoEmbed" 417 | }, 418 | "noframes": { 419 | "deprecated": true, 420 | "constructor": "HTMLElement", 421 | "shortcut": "NoFrames" 422 | }, 423 | "noscript": { 424 | "deprecated": false, 425 | "constructor": "HTMLElement", 426 | "shortcut": "NoScript" 427 | }, 428 | "object": { 429 | "deprecated": false, 430 | "constructor": "HTMLObjectElement", 431 | "shortcut": "Object" 432 | }, 433 | "ol": { 434 | "deprecated": false, 435 | "constructor": "HTMLOListElement", 436 | "shortcut": "OL" 437 | }, 438 | "optgroup": { 439 | "deprecated": false, 440 | "constructor": "HTMLOptGroupElement", 441 | "shortcut": "OptGroup" 442 | }, 443 | "option": { 444 | "deprecated": false, 445 | "constructor": "HTMLOptionElement", 446 | "shortcut": "Option" 447 | }, 448 | "output": { 449 | "deprecated": false, 450 | "constructor": "HTMLOutputElement", 451 | "shortcut": "Output" 452 | }, 453 | "p": { 454 | "deprecated": false, 455 | "constructor": "HTMLParagraphElement", 456 | "shortcut": "P" 457 | }, 458 | "param": { 459 | "deprecated": true, 460 | "constructor": "HTMLParamElement", 461 | "shortcut": "Param" 462 | }, 463 | "picture": { 464 | "deprecated": false, 465 | "constructor": "HTMLPictureElement", 466 | "shortcut": "Picture" 467 | }, 468 | "plaintext": { 469 | "deprecated": true, 470 | "constructor": "HTMLElement", 471 | "shortcut": "PlainText" 472 | }, 473 | "portal": { 474 | "deprecated": false, 475 | "constructor": "HTMLUnknownElement", 476 | "shortcut": "Portal" 477 | }, 478 | "pre": { 479 | "deprecated": false, 480 | "constructor": "HTMLPreElement", 481 | "shortcut": "Pre" 482 | }, 483 | "progress": { 484 | "deprecated": false, 485 | "constructor": "HTMLProgressElement", 486 | "shortcut": "Progress" 487 | }, 488 | "q": { 489 | "deprecated": false, 490 | "constructor": "HTMLQuoteElement", 491 | "shortcut": "Q" 492 | }, 493 | "rb": { 494 | "deprecated": true, 495 | "constructor": "HTMLElement", 496 | "shortcut": "RB" 497 | }, 498 | "rp": { 499 | "deprecated": false, 500 | "constructor": "HTMLElement", 501 | "shortcut": "RP" 502 | }, 503 | "rt": { 504 | "deprecated": false, 505 | "constructor": "HTMLElement", 506 | "shortcut": "RT" 507 | }, 508 | "rtc": { 509 | "deprecated": true, 510 | "constructor": "HTMLElement", 511 | "shortcut": "RTC" 512 | }, 513 | "ruby": { 514 | "deprecated": false, 515 | "constructor": "HTMLElement", 516 | "shortcut": "Ruby" 517 | }, 518 | "s": { 519 | "deprecated": false, 520 | "constructor": "HTMLElement", 521 | "shortcut": "S" 522 | }, 523 | "samp": { 524 | "deprecated": false, 525 | "constructor": "HTMLElement", 526 | "shortcut": "Samp" 527 | }, 528 | "script": { 529 | "deprecated": false, 530 | "constructor": "HTMLScriptElement", 531 | "shortcut": "Script" 532 | }, 533 | "section": { 534 | "deprecated": false, 535 | "constructor": "HTMLElement", 536 | "shortcut": "Section" 537 | }, 538 | "select": { 539 | "deprecated": false, 540 | "constructor": "HTMLSelectElement", 541 | "shortcut": "Select" 542 | }, 543 | "shadow": { 544 | "deprecated": true, 545 | "constructor": "HTMLUnknownElement", 546 | "shortcut": "Shadow" 547 | }, 548 | "slot": { 549 | "deprecated": false, 550 | "constructor": "HTMLSlotElement", 551 | "shortcut": "Slot" 552 | }, 553 | "small": { 554 | "deprecated": false, 555 | "constructor": "HTMLElement", 556 | "shortcut": "Small" 557 | }, 558 | "source": { 559 | "deprecated": false, 560 | "constructor": "HTMLSourceElement", 561 | "shortcut": "Source" 562 | }, 563 | "spacer": { 564 | "deprecated": true, 565 | "constructor": "HTMLUnknownElement", 566 | "shortcut": "Spacer" 567 | }, 568 | "span": { 569 | "deprecated": false, 570 | "constructor": "HTMLSpanElement", 571 | "shortcut": "Span" 572 | }, 573 | "strike": { 574 | "deprecated": true, 575 | "constructor": "HTMLElement", 576 | "shortcut": "Strike" 577 | }, 578 | "strong": { 579 | "deprecated": false, 580 | "constructor": "HTMLElement", 581 | "shortcut": "Strong" 582 | }, 583 | "style": { 584 | "deprecated": false, 585 | "constructor": "HTMLStyleElement", 586 | "shortcut": "Style" 587 | }, 588 | "sub": { 589 | "deprecated": false, 590 | "constructor": "HTMLElement", 591 | "shortcut": "Sub" 592 | }, 593 | "summary": { 594 | "deprecated": false, 595 | "constructor": "HTMLElement", 596 | "shortcut": "Summary" 597 | }, 598 | "sup": { 599 | "deprecated": false, 600 | "constructor": "HTMLElement", 601 | "shortcut": "Sup" 602 | }, 603 | "table": { 604 | "deprecated": false, 605 | "constructor": "HTMLTableElement", 606 | "shortcut": "Table" 607 | }, 608 | "tbody": { 609 | "deprecated": false, 610 | "constructor": "HTMLTableSectionElement", 611 | "shortcut": "TBody" 612 | }, 613 | "td": { 614 | "deprecated": false, 615 | "constructor": "HTMLTableCellElement", 616 | "shortcut": "TD" 617 | }, 618 | "template": { 619 | "deprecated": false, 620 | "constructor": "HTMLTemplateElement", 621 | "shortcut": "Template" 622 | }, 623 | "textarea": { 624 | "deprecated": false, 625 | "constructor": "HTMLTextAreaElement", 626 | "shortcut": "TextArea" 627 | }, 628 | "tfoot": { 629 | "deprecated": false, 630 | "constructor": "HTMLTableSectionElement", 631 | "shortcut": "TFoot" 632 | }, 633 | "th": { 634 | "deprecated": false, 635 | "constructor": "HTMLTableCellElement", 636 | "shortcut": "TH" 637 | }, 638 | "thead": { 639 | "deprecated": false, 640 | "constructor": "HTMLTableSectionElement", 641 | "shortcut": "THead" 642 | }, 643 | "time": { 644 | "deprecated": false, 645 | "constructor": "HTMLTimeElement", 646 | "shortcut": "Time" 647 | }, 648 | "title": { 649 | "deprecated": false, 650 | "constructor": "HTMLTitleElement", 651 | "shortcut": "Title" 652 | }, 653 | "tr": { 654 | "deprecated": false, 655 | "constructor": "HTMLTableRowElement", 656 | "shortcut": "TR" 657 | }, 658 | "track": { 659 | "deprecated": false, 660 | "constructor": "HTMLTrackElement", 661 | "shortcut": "Track" 662 | }, 663 | "tt": { 664 | "deprecated": true, 665 | "constructor": "HTMLElement", 666 | "shortcut": "TT" 667 | }, 668 | "u": { 669 | "deprecated": false, 670 | "constructor": "HTMLElement", 671 | "shortcut": "U" 672 | }, 673 | "ul": { 674 | "deprecated": false, 675 | "constructor": "HTMLUListElement", 676 | "shortcut": "UL" 677 | }, 678 | "var": { 679 | "deprecated": false, 680 | "constructor": "HTMLElement", 681 | "shortcut": "Var" 682 | }, 683 | "video": { 684 | "deprecated": false, 685 | "constructor": "HTMLVideoElement", 686 | "shortcut": "Video" 687 | }, 688 | "wbr": { 689 | "deprecated": false, 690 | "constructor": "HTMLElement", 691 | "shortcut": "Wbr" 692 | }, 693 | "xmp": { 694 | "deprecated": true, 695 | "constructor": "HTMLPreElement", 696 | "shortcut": "XMP" 697 | } 698 | }); 699 | -------------------------------------------------------------------------------- /cjs/index.js: -------------------------------------------------------------------------------- 1 | 'use strict'; 2 | /*! (c) Andrea Giammarchi - ISC */ 3 | 4 | // ⚠ THIS FILE IS CREATED VIA AUTOMATION 5 | 6 | /** 7 | * @typedef {Object} HTML 8 | * @property {new () => HTMLAnchorElement} A 9 | * @property {new () => HTMLElement} Abbr 10 | * @property {new () => HTMLElement} Address 11 | * @property {new () => HTMLAreaElement} Area 12 | * @property {new () => HTMLElement} Article 13 | * @property {new () => HTMLElement} Aside 14 | * @property {new () => HTMLAudioElement} Audio 15 | * @property {new () => HTMLElement} B 16 | * @property {new () => HTMLBaseElement} Base 17 | * @property {new () => HTMLElement} Bdi 18 | * @property {new () => HTMLElement} Bdo 19 | * @property {new () => HTMLQuoteElement} BlockQuote 20 | * @property {new () => HTMLBodyElement} Body 21 | * @property {new () => HTMLBRElement} BR 22 | * @property {new () => HTMLButtonElement} Button 23 | * @property {new () => HTMLCanvasElement} Canvas 24 | * @property {new () => HTMLTableCaptionElement} Caption 25 | * @property {new () => HTMLElement} Cite 26 | * @property {new () => HTMLElement} Code 27 | * @property {new () => HTMLTableColElement} Col 28 | * @property {new () => HTMLTableColElement} ColGroup 29 | * @property {new () => HTMLDataElement} Data 30 | * @property {new () => HTMLDataListElement} DataList 31 | * @property {new () => HTMLElement} DD 32 | * @property {new () => HTMLModElement} Del 33 | * @property {new () => HTMLDetailsElement} Details 34 | * @property {new () => HTMLElement} Dfn 35 | * @property {new () => HTMLDialogElement} Dialog 36 | * @property {new () => HTMLDivElement} Div 37 | * @property {new () => HTMLDListElement} DL 38 | * @property {new () => HTMLElement} DT 39 | * @property {new () => HTMLElement} Element 40 | * @property {new () => HTMLElement} Em 41 | * @property {new () => HTMLEmbedElement} Embed 42 | * @property {new () => HTMLFieldSetElement} FieldSet 43 | * @property {new () => HTMLElement} FigCaption 44 | * @property {new () => HTMLElement} Figure 45 | * @property {new () => HTMLElement} Footer 46 | * @property {new () => HTMLFormElement} Form 47 | * @property {new () => HTMLHeadingElement} H1 48 | * @property {new () => HTMLHeadingElement} H2 49 | * @property {new () => HTMLHeadingElement} H3 50 | * @property {new () => HTMLHeadingElement} H4 51 | * @property {new () => HTMLHeadingElement} H5 52 | * @property {new () => HTMLHeadingElement} H6 53 | * @property {new () => HTMLHeadElement} Head 54 | * @property {new () => HTMLElement} Header 55 | * @property {new () => HTMLHRElement} HR 56 | * @property {new () => HTMLHtmlElement} Html 57 | * @property {new () => HTMLElement} I 58 | * @property {new () => HTMLIFrameElement} IFrame 59 | * @property {new () => HTMLImageElement} Img 60 | * @property {new () => HTMLInputElement} Input 61 | * @property {new () => HTMLModElement} Ins 62 | * @property {new () => HTMLElement} Kbd 63 | * @property {new () => HTMLLabelElement} Label 64 | * @property {new () => HTMLLegendElement} Legend 65 | * @property {new () => HTMLLIElement} LI 66 | * @property {new () => HTMLLinkElement} Link 67 | * @property {new () => HTMLElement} Main 68 | * @property {new () => HTMLMapElement} Map 69 | * @property {new () => HTMLElement} Mark 70 | * @property {new () => HTMLMenuElement} Menu 71 | * @property {new () => HTMLMetaElement} Meta 72 | * @property {new () => HTMLMeterElement} Meter 73 | * @property {new () => HTMLElement} Nav 74 | * @property {new () => HTMLElement} NoScript 75 | * @property {new () => HTMLObjectElement} Object 76 | * @property {new () => HTMLOListElement} OL 77 | * @property {new () => HTMLOptGroupElement} OptGroup 78 | * @property {new () => HTMLOptionElement} Option 79 | * @property {new () => HTMLOutputElement} Output 80 | * @property {new () => HTMLParagraphElement} P 81 | * @property {new () => HTMLPictureElement} Picture 82 | * @property {new () => HTMLUnknownElement} Portal 83 | * @property {new () => HTMLPreElement} Pre 84 | * @property {new () => HTMLProgressElement} Progress 85 | * @property {new () => HTMLQuoteElement} Q 86 | * @property {new () => HTMLElement} RP 87 | * @property {new () => HTMLElement} RT 88 | * @property {new () => HTMLElement} Ruby 89 | * @property {new () => HTMLElement} S 90 | * @property {new () => HTMLElement} Samp 91 | * @property {new () => HTMLScriptElement} Script 92 | * @property {new () => HTMLElement} Section 93 | * @property {new () => HTMLSelectElement} Select 94 | * @property {new () => HTMLSlotElement} Slot 95 | * @property {new () => HTMLElement} Small 96 | * @property {new () => HTMLSourceElement} Source 97 | * @property {new () => HTMLSpanElement} Span 98 | * @property {new () => HTMLElement} Strong 99 | * @property {new () => HTMLStyleElement} Style 100 | * @property {new () => HTMLElement} Sub 101 | * @property {new () => HTMLElement} Summary 102 | * @property {new () => HTMLElement} Sup 103 | * @property {new () => HTMLTableElement} Table 104 | * @property {new () => HTMLTableSectionElement} TBody 105 | * @property {new () => HTMLTableCellElement} TD 106 | * @property {new () => HTMLTemplateElement} Template 107 | * @property {new () => HTMLTextAreaElement} TextArea 108 | * @property {new () => HTMLTableSectionElement} TFoot 109 | * @property {new () => HTMLTableCellElement} TH 110 | * @property {new () => HTMLTableSectionElement} THead 111 | * @property {new () => HTMLTimeElement} Time 112 | * @property {new () => HTMLTitleElement} Title 113 | * @property {new () => HTMLTableRowElement} TR 114 | * @property {new () => HTMLTrackElement} Track 115 | * @property {new () => HTMLElement} U 116 | * @property {new () => HTMLUListElement} UL 117 | * @property {new () => HTMLElement} Var 118 | * @property {new () => HTMLVideoElement} Video 119 | * @property {new () => HTMLElement} Wbr 120 | */ 121 | 122 | const Anchor = "Anchor"; 123 | const Element = "Element"; 124 | const Quote = "Quote"; 125 | const TableCaption = "TableCaption"; 126 | const TableCol = "TableCol"; 127 | const Mod = "Mod"; 128 | const DList = "DList"; 129 | const Heading = "Heading"; 130 | const Image = "Image"; 131 | const OList = "OList"; 132 | const Paragraph = "Paragraph"; 133 | const Unknown = "Unknown"; 134 | const TableSection = "TableSection"; 135 | const TableCell = "TableCell"; 136 | const TableRow = "TableRow"; 137 | const UList = "UList"; 138 | 139 | /** 140 | * Given an optional global context, returns a proxy that resolves 141 | * all tag names into their global constructors. 142 | * @property {globalThis} [self=globalThis] 143 | * @returns {HTML} 144 | */ 145 | module.exports = (self = globalThis) => new Proxy( 146 | new Map([ 147 | ["a", Anchor], 148 | ["abbr", Element], 149 | ["address", Element], 150 | ["article", Element], 151 | ["aside", Element], 152 | ["b", Element], 153 | ["bdi", Element], 154 | ["bdo", Element], 155 | ["blockquote", Quote], 156 | ["caption", TableCaption], 157 | ["cite", Element], 158 | ["code", Element], 159 | ["col", TableCol], 160 | ["colgroup", TableCol], 161 | ["dd", Element], 162 | ["del", Mod], 163 | ["dfn", Element], 164 | ["dl", DList], 165 | ["dt", Element], 166 | ["em", Element], 167 | ["figcaption", Element], 168 | ["figure", Element], 169 | ["footer", Element], 170 | ["h1", Heading], 171 | ["h2", Heading], 172 | ["h3", Heading], 173 | ["h4", Heading], 174 | ["h5", Heading], 175 | ["h6", Heading], 176 | ["header", Element], 177 | ["i", Element], 178 | ["img", Image], 179 | ["ins", Mod], 180 | ["kbd", Element], 181 | ["main", Element], 182 | ["mark", Element], 183 | ["nav", Element], 184 | ["noscript", Element], 185 | ["ol", OList], 186 | ["p", Paragraph], 187 | ["portal", Unknown], 188 | ["q", Quote], 189 | ["rp", Element], 190 | ["rt", Element], 191 | ["ruby", Element], 192 | ["s", Element], 193 | ["samp", Element], 194 | ["section", Element], 195 | ["small", Element], 196 | ["strong", Element], 197 | ["sub", Element], 198 | ["summary", Element], 199 | ["sup", Element], 200 | ["tbody", TableSection], 201 | ["td", TableCell], 202 | ["tfoot", TableSection], 203 | ["th", TableCell], 204 | ["thead", TableSection], 205 | ["tr", TableRow], 206 | ["u", Element], 207 | ["ul", UList], 208 | ["var", Element], 209 | ["wbr", Element] 210 | ]), 211 | { 212 | get(tags, name) { 213 | const Class = tags.get(name.toLowerCase()) || (name === Element ? '' : name); 214 | return self['HTML' + Class + Element]; 215 | } 216 | } 217 | ); 218 | -------------------------------------------------------------------------------- /cjs/names.js: -------------------------------------------------------------------------------- 1 | 'use strict'; 2 | /*! (c) Andrea Giammarchi - ISC */ 3 | 4 | // ⚠ THIS FILE IS CREATED VIA AUTOMATION 5 | 6 | const proxiedHTMLConstructors = (m => /* c8 ignore start */ m.__esModule ? m.default : m /* c8 ignore stop */)(require('./index.js')); 7 | 8 | /** 9 | * @typedef {Object} HTML 10 | * @property {"HTMLAnchorElement"} A 11 | * @property {"HTMLElement"} Abbr 12 | * @property {"HTMLElement"} Address 13 | * @property {"HTMLAreaElement"} Area 14 | * @property {"HTMLElement"} Article 15 | * @property {"HTMLElement"} Aside 16 | * @property {"HTMLAudioElement"} Audio 17 | * @property {"HTMLElement"} B 18 | * @property {"HTMLBaseElement"} Base 19 | * @property {"HTMLElement"} Bdi 20 | * @property {"HTMLElement"} Bdo 21 | * @property {"HTMLQuoteElement"} BlockQuote 22 | * @property {"HTMLBodyElement"} Body 23 | * @property {"HTMLBRElement"} BR 24 | * @property {"HTMLButtonElement"} Button 25 | * @property {"HTMLCanvasElement"} Canvas 26 | * @property {"HTMLTableCaptionElement"} Caption 27 | * @property {"HTMLElement"} Cite 28 | * @property {"HTMLElement"} Code 29 | * @property {"HTMLTableColElement"} Col 30 | * @property {"HTMLTableColElement"} ColGroup 31 | * @property {"HTMLDataElement"} Data 32 | * @property {"HTMLDataListElement"} DataList 33 | * @property {"HTMLElement"} DD 34 | * @property {"HTMLModElement"} Del 35 | * @property {"HTMLDetailsElement"} Details 36 | * @property {"HTMLElement"} Dfn 37 | * @property {"HTMLDialogElement"} Dialog 38 | * @property {"HTMLDivElement"} Div 39 | * @property {"HTMLDListElement"} DL 40 | * @property {"HTMLElement"} DT 41 | * @property {"HTMLElement"} Element 42 | * @property {"HTMLElement"} Em 43 | * @property {"HTMLEmbedElement"} Embed 44 | * @property {"HTMLFieldSetElement"} FieldSet 45 | * @property {"HTMLElement"} FigCaption 46 | * @property {"HTMLElement"} Figure 47 | * @property {"HTMLElement"} Footer 48 | * @property {"HTMLFormElement"} Form 49 | * @property {"HTMLHeadingElement"} H1 50 | * @property {"HTMLHeadingElement"} H2 51 | * @property {"HTMLHeadingElement"} H3 52 | * @property {"HTMLHeadingElement"} H4 53 | * @property {"HTMLHeadingElement"} H5 54 | * @property {"HTMLHeadingElement"} H6 55 | * @property {"HTMLHeadElement"} Head 56 | * @property {"HTMLElement"} Header 57 | * @property {"HTMLHRElement"} HR 58 | * @property {"HTMLHtmlElement"} Html 59 | * @property {"HTMLElement"} I 60 | * @property {"HTMLIFrameElement"} IFrame 61 | * @property {"HTMLImageElement"} Img 62 | * @property {"HTMLInputElement"} Input 63 | * @property {"HTMLModElement"} Ins 64 | * @property {"HTMLElement"} Kbd 65 | * @property {"HTMLLabelElement"} Label 66 | * @property {"HTMLLegendElement"} Legend 67 | * @property {"HTMLLIElement"} LI 68 | * @property {"HTMLLinkElement"} Link 69 | * @property {"HTMLElement"} Main 70 | * @property {"HTMLMapElement"} Map 71 | * @property {"HTMLElement"} Mark 72 | * @property {"HTMLMenuElement"} Menu 73 | * @property {"HTMLMetaElement"} Meta 74 | * @property {"HTMLMeterElement"} Meter 75 | * @property {"HTMLElement"} Nav 76 | * @property {"HTMLElement"} NoScript 77 | * @property {"HTMLObjectElement"} Object 78 | * @property {"HTMLOListElement"} OL 79 | * @property {"HTMLOptGroupElement"} OptGroup 80 | * @property {"HTMLOptionElement"} Option 81 | * @property {"HTMLOutputElement"} Output 82 | * @property {"HTMLParagraphElement"} P 83 | * @property {"HTMLPictureElement"} Picture 84 | * @property {"HTMLUnknownElement"} Portal 85 | * @property {"HTMLPreElement"} Pre 86 | * @property {"HTMLProgressElement"} Progress 87 | * @property {"HTMLQuoteElement"} Q 88 | * @property {"HTMLElement"} RP 89 | * @property {"HTMLElement"} RT 90 | * @property {"HTMLElement"} Ruby 91 | * @property {"HTMLElement"} S 92 | * @property {"HTMLElement"} Samp 93 | * @property {"HTMLScriptElement"} Script 94 | * @property {"HTMLElement"} Section 95 | * @property {"HTMLSelectElement"} Select 96 | * @property {"HTMLSlotElement"} Slot 97 | * @property {"HTMLElement"} Small 98 | * @property {"HTMLSourceElement"} Source 99 | * @property {"HTMLSpanElement"} Span 100 | * @property {"HTMLElement"} Strong 101 | * @property {"HTMLStyleElement"} Style 102 | * @property {"HTMLElement"} Sub 103 | * @property {"HTMLElement"} Summary 104 | * @property {"HTMLElement"} Sup 105 | * @property {"HTMLTableElement"} Table 106 | * @property {"HTMLTableSectionElement"} TBody 107 | * @property {"HTMLTableCellElement"} TD 108 | * @property {"HTMLTemplateElement"} Template 109 | * @property {"HTMLTextAreaElement"} TextArea 110 | * @property {"HTMLTableSectionElement"} TFoot 111 | * @property {"HTMLTableCellElement"} TH 112 | * @property {"HTMLTableSectionElement"} THead 113 | * @property {"HTMLTimeElement"} Time 114 | * @property {"HTMLTitleElement"} Title 115 | * @property {"HTMLTableRowElement"} TR 116 | * @property {"HTMLTrackElement"} Track 117 | * @property {"HTMLElement"} U 118 | * @property {"HTMLUListElement"} UL 119 | * @property {"HTMLElement"} Var 120 | * @property {"HTMLVideoElement"} Video 121 | * @property {"HTMLElement"} Wbr 122 | */ 123 | 124 | const handler = {get: (_, name) => name}; 125 | 126 | /** @type {HTML} */ 127 | module.exports = proxiedHTMLConstructors(new Proxy(handler, handler)); 128 | -------------------------------------------------------------------------------- /cjs/package.json: -------------------------------------------------------------------------------- 1 | {"type":"commonjs"} -------------------------------------------------------------------------------- /esm/all-names.js: -------------------------------------------------------------------------------- 1 | /*! (c) Andrea Giammarchi - ISC */ 2 | 3 | // ⚠ THIS FILE IS CREATED VIA AUTOMATION 4 | 5 | import proxiedHTMLConstructors from './all.js'; 6 | 7 | /** 8 | * @typedef {Object} HTML 9 | * @property {"HTMLAnchorElement"} A 10 | * @property {"HTMLElement"} Abbr 11 | * @property {"HTMLElement"} Acronym 12 | * @property {"HTMLElement"} Address 13 | * @property {"HTMLUnknownElement"} Applet 14 | * @property {"HTMLAreaElement"} Area 15 | * @property {"HTMLElement"} Article 16 | * @property {"HTMLElement"} Aside 17 | * @property {"HTMLAudioElement"} Audio 18 | * @property {"HTMLElement"} B 19 | * @property {"HTMLBaseElement"} Base 20 | * @property {"HTMLElement"} Bdi 21 | * @property {"HTMLElement"} Bdo 22 | * @property {"HTMLUnknownElement"} BGSound 23 | * @property {"HTMLElement"} Big 24 | * @property {"HTMLUnknownElement"} Blink 25 | * @property {"HTMLQuoteElement"} BlockQuote 26 | * @property {"HTMLBodyElement"} Body 27 | * @property {"HTMLBRElement"} BR 28 | * @property {"HTMLButtonElement"} Button 29 | * @property {"HTMLCanvasElement"} Canvas 30 | * @property {"HTMLTableCaptionElement"} Caption 31 | * @property {"HTMLElement"} Center 32 | * @property {"HTMLElement"} Cite 33 | * @property {"HTMLElement"} Code 34 | * @property {"HTMLTableColElement"} Col 35 | * @property {"HTMLTableColElement"} ColGroup 36 | * @property {"HTMLUnknownElement"} Content 37 | * @property {"HTMLDataElement"} Data 38 | * @property {"HTMLDataListElement"} DataList 39 | * @property {"HTMLElement"} DD 40 | * @property {"HTMLModElement"} Del 41 | * @property {"HTMLDetailsElement"} Details 42 | * @property {"HTMLElement"} Dfn 43 | * @property {"HTMLDialogElement"} Dialog 44 | * @property {"HTMLDirectoryElement"} Dir 45 | * @property {"HTMLDivElement"} Div 46 | * @property {"HTMLDListElement"} DL 47 | * @property {"HTMLElement"} DT 48 | * @property {"HTMLElement"} Element 49 | * @property {"HTMLElement"} Em 50 | * @property {"HTMLEmbedElement"} Embed 51 | * @property {"HTMLFieldSetElement"} FieldSet 52 | * @property {"HTMLElement"} FigCaption 53 | * @property {"HTMLElement"} Figure 54 | * @property {"HTMLFontElement"} Font 55 | * @property {"HTMLElement"} Footer 56 | * @property {"HTMLFormElement"} Form 57 | * @property {"HTMLFrameElement"} Frame 58 | * @property {"HTMLFrameSetElement"} FrameSet 59 | * @property {"HTMLHeadingElement"} H1 60 | * @property {"HTMLHeadingElement"} H2 61 | * @property {"HTMLHeadingElement"} H3 62 | * @property {"HTMLHeadingElement"} H4 63 | * @property {"HTMLHeadingElement"} H5 64 | * @property {"HTMLHeadingElement"} H6 65 | * @property {"HTMLHeadElement"} Head 66 | * @property {"HTMLElement"} Header 67 | * @property {"HTMLHRElement"} HR 68 | * @property {"HTMLHtmlElement"} Html 69 | * @property {"HTMLElement"} I 70 | * @property {"HTMLIFrameElement"} IFrame 71 | * @property {"HTMLUnknownElement"} Image 72 | * @property {"HTMLImageElement"} Img 73 | * @property {"HTMLInputElement"} Input 74 | * @property {"HTMLModElement"} Ins 75 | * @property {"HTMLElement"} Kbd 76 | * @property {"HTMLUnknownElement"} Keygen 77 | * @property {"HTMLLabelElement"} Label 78 | * @property {"HTMLLegendElement"} Legend 79 | * @property {"HTMLLIElement"} LI 80 | * @property {"HTMLLinkElement"} Link 81 | * @property {"HTMLElement"} Main 82 | * @property {"HTMLMapElement"} Map 83 | * @property {"HTMLElement"} Mark 84 | * @property {"HTMLMarqueeElement"} Marquee 85 | * @property {"HTMLMenuElement"} Menu 86 | * @property {"HTMLUnknownElement"} MenuItem 87 | * @property {"HTMLMetaElement"} Meta 88 | * @property {"HTMLMeterElement"} Meter 89 | * @property {"HTMLElement"} Nav 90 | * @property {"HTMLElement"} NoBR 91 | * @property {"HTMLElement"} NoEmbed 92 | * @property {"HTMLElement"} NoFrames 93 | * @property {"HTMLElement"} NoScript 94 | * @property {"HTMLObjectElement"} Object 95 | * @property {"HTMLOListElement"} OL 96 | * @property {"HTMLOptGroupElement"} OptGroup 97 | * @property {"HTMLOptionElement"} Option 98 | * @property {"HTMLOutputElement"} Output 99 | * @property {"HTMLParagraphElement"} P 100 | * @property {"HTMLParamElement"} Param 101 | * @property {"HTMLPictureElement"} Picture 102 | * @property {"HTMLElement"} PlainText 103 | * @property {"HTMLUnknownElement"} Portal 104 | * @property {"HTMLPreElement"} Pre 105 | * @property {"HTMLProgressElement"} Progress 106 | * @property {"HTMLQuoteElement"} Q 107 | * @property {"HTMLElement"} RB 108 | * @property {"HTMLElement"} RP 109 | * @property {"HTMLElement"} RT 110 | * @property {"HTMLElement"} RTC 111 | * @property {"HTMLElement"} Ruby 112 | * @property {"HTMLElement"} S 113 | * @property {"HTMLElement"} Samp 114 | * @property {"HTMLScriptElement"} Script 115 | * @property {"HTMLElement"} Section 116 | * @property {"HTMLSelectElement"} Select 117 | * @property {"HTMLUnknownElement"} Shadow 118 | * @property {"HTMLSlotElement"} Slot 119 | * @property {"HTMLElement"} Small 120 | * @property {"HTMLSourceElement"} Source 121 | * @property {"HTMLUnknownElement"} Spacer 122 | * @property {"HTMLSpanElement"} Span 123 | * @property {"HTMLElement"} Strike 124 | * @property {"HTMLElement"} Strong 125 | * @property {"HTMLStyleElement"} Style 126 | * @property {"HTMLElement"} Sub 127 | * @property {"HTMLElement"} Summary 128 | * @property {"HTMLElement"} Sup 129 | * @property {"HTMLTableElement"} Table 130 | * @property {"HTMLTableSectionElement"} TBody 131 | * @property {"HTMLTableCellElement"} TD 132 | * @property {"HTMLTemplateElement"} Template 133 | * @property {"HTMLTextAreaElement"} TextArea 134 | * @property {"HTMLTableSectionElement"} TFoot 135 | * @property {"HTMLTableCellElement"} TH 136 | * @property {"HTMLTableSectionElement"} THead 137 | * @property {"HTMLTimeElement"} Time 138 | * @property {"HTMLTitleElement"} Title 139 | * @property {"HTMLTableRowElement"} TR 140 | * @property {"HTMLTrackElement"} Track 141 | * @property {"HTMLElement"} TT 142 | * @property {"HTMLElement"} U 143 | * @property {"HTMLUListElement"} UL 144 | * @property {"HTMLElement"} Var 145 | * @property {"HTMLVideoElement"} Video 146 | * @property {"HTMLElement"} Wbr 147 | * @property {"HTMLPreElement"} XMP 148 | */ 149 | 150 | const handler = {get: (_, name) => name}; 151 | 152 | /** @type {HTML} */ 153 | export default proxiedHTMLConstructors(new Proxy(handler, handler)); 154 | -------------------------------------------------------------------------------- /esm/all.js: -------------------------------------------------------------------------------- 1 | /*! (c) Andrea Giammarchi - ISC */ 2 | 3 | // ⚠ THIS FILE IS CREATED VIA AUTOMATION 4 | 5 | /** 6 | * @typedef {Object} HTML 7 | * @property {new () => HTMLAnchorElement} A 8 | * @property {new () => HTMLElement} Abbr 9 | * @property {new () => HTMLElement} Acronym 10 | * @property {new () => HTMLElement} Address 11 | * @property {new () => HTMLUnknownElement} Applet 12 | * @property {new () => HTMLAreaElement} Area 13 | * @property {new () => HTMLElement} Article 14 | * @property {new () => HTMLElement} Aside 15 | * @property {new () => HTMLAudioElement} Audio 16 | * @property {new () => HTMLElement} B 17 | * @property {new () => HTMLBaseElement} Base 18 | * @property {new () => HTMLElement} Bdi 19 | * @property {new () => HTMLElement} Bdo 20 | * @property {new () => HTMLUnknownElement} BGSound 21 | * @property {new () => HTMLElement} Big 22 | * @property {new () => HTMLUnknownElement} Blink 23 | * @property {new () => HTMLQuoteElement} BlockQuote 24 | * @property {new () => HTMLBodyElement} Body 25 | * @property {new () => HTMLBRElement} BR 26 | * @property {new () => HTMLButtonElement} Button 27 | * @property {new () => HTMLCanvasElement} Canvas 28 | * @property {new () => HTMLTableCaptionElement} Caption 29 | * @property {new () => HTMLElement} Center 30 | * @property {new () => HTMLElement} Cite 31 | * @property {new () => HTMLElement} Code 32 | * @property {new () => HTMLTableColElement} Col 33 | * @property {new () => HTMLTableColElement} ColGroup 34 | * @property {new () => HTMLUnknownElement} Content 35 | * @property {new () => HTMLDataElement} Data 36 | * @property {new () => HTMLDataListElement} DataList 37 | * @property {new () => HTMLElement} DD 38 | * @property {new () => HTMLModElement} Del 39 | * @property {new () => HTMLDetailsElement} Details 40 | * @property {new () => HTMLElement} Dfn 41 | * @property {new () => HTMLDialogElement} Dialog 42 | * @property {new () => HTMLDirectoryElement} Dir 43 | * @property {new () => HTMLDivElement} Div 44 | * @property {new () => HTMLDListElement} DL 45 | * @property {new () => HTMLElement} DT 46 | * @property {new () => HTMLElement} Element 47 | * @property {new () => HTMLElement} Em 48 | * @property {new () => HTMLEmbedElement} Embed 49 | * @property {new () => HTMLFieldSetElement} FieldSet 50 | * @property {new () => HTMLElement} FigCaption 51 | * @property {new () => HTMLElement} Figure 52 | * @property {new () => HTMLFontElement} Font 53 | * @property {new () => HTMLElement} Footer 54 | * @property {new () => HTMLFormElement} Form 55 | * @property {new () => HTMLFrameElement} Frame 56 | * @property {new () => HTMLFrameSetElement} FrameSet 57 | * @property {new () => HTMLHeadingElement} H1 58 | * @property {new () => HTMLHeadingElement} H2 59 | * @property {new () => HTMLHeadingElement} H3 60 | * @property {new () => HTMLHeadingElement} H4 61 | * @property {new () => HTMLHeadingElement} H5 62 | * @property {new () => HTMLHeadingElement} H6 63 | * @property {new () => HTMLHeadElement} Head 64 | * @property {new () => HTMLElement} Header 65 | * @property {new () => HTMLHRElement} HR 66 | * @property {new () => HTMLHtmlElement} Html 67 | * @property {new () => HTMLElement} I 68 | * @property {new () => HTMLIFrameElement} IFrame 69 | * @property {new () => HTMLUnknownElement} Image 70 | * @property {new () => HTMLImageElement} Img 71 | * @property {new () => HTMLInputElement} Input 72 | * @property {new () => HTMLModElement} Ins 73 | * @property {new () => HTMLElement} Kbd 74 | * @property {new () => HTMLUnknownElement} Keygen 75 | * @property {new () => HTMLLabelElement} Label 76 | * @property {new () => HTMLLegendElement} Legend 77 | * @property {new () => HTMLLIElement} LI 78 | * @property {new () => HTMLLinkElement} Link 79 | * @property {new () => HTMLElement} Main 80 | * @property {new () => HTMLMapElement} Map 81 | * @property {new () => HTMLElement} Mark 82 | * @property {new () => HTMLMarqueeElement} Marquee 83 | * @property {new () => HTMLMenuElement} Menu 84 | * @property {new () => HTMLUnknownElement} MenuItem 85 | * @property {new () => HTMLMetaElement} Meta 86 | * @property {new () => HTMLMeterElement} Meter 87 | * @property {new () => HTMLElement} Nav 88 | * @property {new () => HTMLElement} NoBR 89 | * @property {new () => HTMLElement} NoEmbed 90 | * @property {new () => HTMLElement} NoFrames 91 | * @property {new () => HTMLElement} NoScript 92 | * @property {new () => HTMLObjectElement} Object 93 | * @property {new () => HTMLOListElement} OL 94 | * @property {new () => HTMLOptGroupElement} OptGroup 95 | * @property {new () => HTMLOptionElement} Option 96 | * @property {new () => HTMLOutputElement} Output 97 | * @property {new () => HTMLParagraphElement} P 98 | * @property {new () => HTMLParamElement} Param 99 | * @property {new () => HTMLPictureElement} Picture 100 | * @property {new () => HTMLElement} PlainText 101 | * @property {new () => HTMLUnknownElement} Portal 102 | * @property {new () => HTMLPreElement} Pre 103 | * @property {new () => HTMLProgressElement} Progress 104 | * @property {new () => HTMLQuoteElement} Q 105 | * @property {new () => HTMLElement} RB 106 | * @property {new () => HTMLElement} RP 107 | * @property {new () => HTMLElement} RT 108 | * @property {new () => HTMLElement} RTC 109 | * @property {new () => HTMLElement} Ruby 110 | * @property {new () => HTMLElement} S 111 | * @property {new () => HTMLElement} Samp 112 | * @property {new () => HTMLScriptElement} Script 113 | * @property {new () => HTMLElement} Section 114 | * @property {new () => HTMLSelectElement} Select 115 | * @property {new () => HTMLUnknownElement} Shadow 116 | * @property {new () => HTMLSlotElement} Slot 117 | * @property {new () => HTMLElement} Small 118 | * @property {new () => HTMLSourceElement} Source 119 | * @property {new () => HTMLUnknownElement} Spacer 120 | * @property {new () => HTMLSpanElement} Span 121 | * @property {new () => HTMLElement} Strike 122 | * @property {new () => HTMLElement} Strong 123 | * @property {new () => HTMLStyleElement} Style 124 | * @property {new () => HTMLElement} Sub 125 | * @property {new () => HTMLElement} Summary 126 | * @property {new () => HTMLElement} Sup 127 | * @property {new () => HTMLTableElement} Table 128 | * @property {new () => HTMLTableSectionElement} TBody 129 | * @property {new () => HTMLTableCellElement} TD 130 | * @property {new () => HTMLTemplateElement} Template 131 | * @property {new () => HTMLTextAreaElement} TextArea 132 | * @property {new () => HTMLTableSectionElement} TFoot 133 | * @property {new () => HTMLTableCellElement} TH 134 | * @property {new () => HTMLTableSectionElement} THead 135 | * @property {new () => HTMLTimeElement} Time 136 | * @property {new () => HTMLTitleElement} Title 137 | * @property {new () => HTMLTableRowElement} TR 138 | * @property {new () => HTMLTrackElement} Track 139 | * @property {new () => HTMLElement} TT 140 | * @property {new () => HTMLElement} U 141 | * @property {new () => HTMLUListElement} UL 142 | * @property {new () => HTMLElement} Var 143 | * @property {new () => HTMLVideoElement} Video 144 | * @property {new () => HTMLElement} Wbr 145 | * @property {new () => HTMLPreElement} XMP 146 | */ 147 | 148 | const Anchor = "Anchor"; 149 | const Element = "Element"; 150 | const Unknown = "Unknown"; 151 | const Quote = "Quote"; 152 | const TableCaption = "TableCaption"; 153 | const TableCol = "TableCol"; 154 | const Mod = "Mod"; 155 | const Directory = "Directory"; 156 | const DList = "DList"; 157 | const Heading = "Heading"; 158 | const Image = "Image"; 159 | const OList = "OList"; 160 | const Paragraph = "Paragraph"; 161 | const TableSection = "TableSection"; 162 | const TableCell = "TableCell"; 163 | const TableRow = "TableRow"; 164 | const UList = "UList"; 165 | const Pre = "Pre"; 166 | 167 | /** 168 | * Given an optional global context, returns a proxy that resolves 169 | * all tag names into their global constructors. 170 | * @property {globalThis} [self=globalThis] 171 | * @returns {HTML} 172 | */ 173 | export default (self = globalThis) => new Proxy( 174 | new Map([ 175 | ["a", Anchor], 176 | ["abbr", Element], 177 | ["acronym", Element], 178 | ["address", Element], 179 | ["applet", Unknown], 180 | ["article", Element], 181 | ["aside", Element], 182 | ["b", Element], 183 | ["bdi", Element], 184 | ["bdo", Element], 185 | ["bgsound", Unknown], 186 | ["big", Element], 187 | ["blink", Unknown], 188 | ["blockquote", Quote], 189 | ["caption", TableCaption], 190 | ["center", Element], 191 | ["cite", Element], 192 | ["code", Element], 193 | ["col", TableCol], 194 | ["colgroup", TableCol], 195 | ["content", Unknown], 196 | ["dd", Element], 197 | ["del", Mod], 198 | ["dfn", Element], 199 | ["dir", Directory], 200 | ["dl", DList], 201 | ["dt", Element], 202 | ["em", Element], 203 | ["figcaption", Element], 204 | ["figure", Element], 205 | ["footer", Element], 206 | ["h1", Heading], 207 | ["h2", Heading], 208 | ["h3", Heading], 209 | ["h4", Heading], 210 | ["h5", Heading], 211 | ["h6", Heading], 212 | ["header", Element], 213 | ["i", Element], 214 | ["image", Unknown], 215 | ["img", Image], 216 | ["ins", Mod], 217 | ["kbd", Element], 218 | ["keygen", Unknown], 219 | ["main", Element], 220 | ["mark", Element], 221 | ["menuitem", Unknown], 222 | ["nav", Element], 223 | ["nobr", Element], 224 | ["noembed", Element], 225 | ["noframes", Element], 226 | ["noscript", Element], 227 | ["ol", OList], 228 | ["p", Paragraph], 229 | ["plaintext", Element], 230 | ["portal", Unknown], 231 | ["q", Quote], 232 | ["rb", Element], 233 | ["rp", Element], 234 | ["rt", Element], 235 | ["rtc", Element], 236 | ["ruby", Element], 237 | ["s", Element], 238 | ["samp", Element], 239 | ["section", Element], 240 | ["shadow", Unknown], 241 | ["small", Element], 242 | ["spacer", Unknown], 243 | ["strike", Element], 244 | ["strong", Element], 245 | ["sub", Element], 246 | ["summary", Element], 247 | ["sup", Element], 248 | ["tbody", TableSection], 249 | ["td", TableCell], 250 | ["tfoot", TableSection], 251 | ["th", TableCell], 252 | ["thead", TableSection], 253 | ["tr", TableRow], 254 | ["tt", Element], 255 | ["u", Element], 256 | ["ul", UList], 257 | ["var", Element], 258 | ["wbr", Element], 259 | ["xmp", Pre] 260 | ]), 261 | { 262 | get(tags, name) { 263 | const Class = tags.get(name.toLowerCase()) || (name === Element ? '' : name); 264 | return self['HTML' + Class + Element]; 265 | } 266 | } 267 | ); 268 | -------------------------------------------------------------------------------- /esm/data.js: -------------------------------------------------------------------------------- 1 | export default ({ 2 | "a": { 3 | "deprecated": false, 4 | "constructor": "HTMLAnchorElement", 5 | "shortcut": "A" 6 | }, 7 | "abbr": { 8 | "deprecated": false, 9 | "constructor": "HTMLElement", 10 | "shortcut": "Abbr" 11 | }, 12 | "acronym": { 13 | "deprecated": true, 14 | "constructor": "HTMLElement", 15 | "shortcut": "Acronym" 16 | }, 17 | "address": { 18 | "deprecated": false, 19 | "constructor": "HTMLElement", 20 | "shortcut": "Address" 21 | }, 22 | "applet": { 23 | "deprecated": true, 24 | "constructor": "HTMLUnknownElement", 25 | "shortcut": "Applet" 26 | }, 27 | "area": { 28 | "deprecated": false, 29 | "constructor": "HTMLAreaElement", 30 | "shortcut": "Area" 31 | }, 32 | "article": { 33 | "deprecated": false, 34 | "constructor": "HTMLElement", 35 | "shortcut": "Article" 36 | }, 37 | "aside": { 38 | "deprecated": false, 39 | "constructor": "HTMLElement", 40 | "shortcut": "Aside" 41 | }, 42 | "audio": { 43 | "deprecated": false, 44 | "constructor": "HTMLAudioElement", 45 | "shortcut": "Audio" 46 | }, 47 | "b": { 48 | "deprecated": false, 49 | "constructor": "HTMLElement", 50 | "shortcut": "B" 51 | }, 52 | "base": { 53 | "deprecated": false, 54 | "constructor": "HTMLBaseElement", 55 | "shortcut": "Base" 56 | }, 57 | "bdi": { 58 | "deprecated": false, 59 | "constructor": "HTMLElement", 60 | "shortcut": "Bdi" 61 | }, 62 | "bdo": { 63 | "deprecated": false, 64 | "constructor": "HTMLElement", 65 | "shortcut": "Bdo" 66 | }, 67 | "bgsound": { 68 | "deprecated": true, 69 | "constructor": "HTMLUnknownElement", 70 | "shortcut": "BGSound" 71 | }, 72 | "big": { 73 | "deprecated": true, 74 | "constructor": "HTMLElement", 75 | "shortcut": "Big" 76 | }, 77 | "blink": { 78 | "deprecated": true, 79 | "constructor": "HTMLUnknownElement", 80 | "shortcut": "Blink" 81 | }, 82 | "blockquote": { 83 | "deprecated": false, 84 | "constructor": "HTMLQuoteElement", 85 | "shortcut": "BlockQuote" 86 | }, 87 | "body": { 88 | "deprecated": false, 89 | "constructor": "HTMLBodyElement", 90 | "shortcut": "Body" 91 | }, 92 | "br": { 93 | "deprecated": false, 94 | "constructor": "HTMLBRElement", 95 | "shortcut": "BR" 96 | }, 97 | "button": { 98 | "deprecated": false, 99 | "constructor": "HTMLButtonElement", 100 | "shortcut": "Button" 101 | }, 102 | "canvas": { 103 | "deprecated": false, 104 | "constructor": "HTMLCanvasElement", 105 | "shortcut": "Canvas" 106 | }, 107 | "caption": { 108 | "deprecated": false, 109 | "constructor": "HTMLTableCaptionElement", 110 | "shortcut": "Caption" 111 | }, 112 | "center": { 113 | "deprecated": true, 114 | "constructor": "HTMLElement", 115 | "shortcut": "Center" 116 | }, 117 | "cite": { 118 | "deprecated": false, 119 | "constructor": "HTMLElement", 120 | "shortcut": "Cite" 121 | }, 122 | "code": { 123 | "deprecated": false, 124 | "constructor": "HTMLElement", 125 | "shortcut": "Code" 126 | }, 127 | "col": { 128 | "deprecated": false, 129 | "constructor": "HTMLTableColElement", 130 | "shortcut": "Col" 131 | }, 132 | "colgroup": { 133 | "deprecated": false, 134 | "constructor": "HTMLTableColElement", 135 | "shortcut": "ColGroup" 136 | }, 137 | "content": { 138 | "deprecated": true, 139 | "constructor": "HTMLUnknownElement", 140 | "shortcut": "Content" 141 | }, 142 | "data": { 143 | "deprecated": false, 144 | "constructor": "HTMLDataElement", 145 | "shortcut": "Data" 146 | }, 147 | "datalist": { 148 | "deprecated": false, 149 | "constructor": "HTMLDataListElement", 150 | "shortcut": "DataList" 151 | }, 152 | "dd": { 153 | "deprecated": false, 154 | "constructor": "HTMLElement", 155 | "shortcut": "DD" 156 | }, 157 | "del": { 158 | "deprecated": false, 159 | "constructor": "HTMLModElement", 160 | "shortcut": "Del" 161 | }, 162 | "details": { 163 | "deprecated": false, 164 | "constructor": "HTMLDetailsElement", 165 | "shortcut": "Details" 166 | }, 167 | "dfn": { 168 | "deprecated": false, 169 | "constructor": "HTMLElement", 170 | "shortcut": "Dfn" 171 | }, 172 | "dialog": { 173 | "deprecated": false, 174 | "constructor": "HTMLDialogElement", 175 | "shortcut": "Dialog" 176 | }, 177 | "dir": { 178 | "deprecated": true, 179 | "constructor": "HTMLDirectoryElement", 180 | "shortcut": "Dir" 181 | }, 182 | "div": { 183 | "deprecated": false, 184 | "constructor": "HTMLDivElement", 185 | "shortcut": "Div" 186 | }, 187 | "dl": { 188 | "deprecated": false, 189 | "constructor": "HTMLDListElement", 190 | "shortcut": "DL" 191 | }, 192 | "dt": { 193 | "deprecated": false, 194 | "constructor": "HTMLElement", 195 | "shortcut": "DT" 196 | }, 197 | "element": { 198 | "deprecated": false, 199 | "constructor": "HTMLElement", 200 | "shortcut": "Element" 201 | }, 202 | "em": { 203 | "deprecated": false, 204 | "constructor": "HTMLElement", 205 | "shortcut": "Em" 206 | }, 207 | "embed": { 208 | "deprecated": false, 209 | "constructor": "HTMLEmbedElement", 210 | "shortcut": "Embed" 211 | }, 212 | "fieldset": { 213 | "deprecated": false, 214 | "constructor": "HTMLFieldSetElement", 215 | "shortcut": "FieldSet" 216 | }, 217 | "figcaption": { 218 | "deprecated": false, 219 | "constructor": "HTMLElement", 220 | "shortcut": "FigCaption" 221 | }, 222 | "figure": { 223 | "deprecated": false, 224 | "constructor": "HTMLElement", 225 | "shortcut": "Figure" 226 | }, 227 | "font": { 228 | "deprecated": true, 229 | "constructor": "HTMLFontElement", 230 | "shortcut": "Font" 231 | }, 232 | "footer": { 233 | "deprecated": false, 234 | "constructor": "HTMLElement", 235 | "shortcut": "Footer" 236 | }, 237 | "form": { 238 | "deprecated": false, 239 | "constructor": "HTMLFormElement", 240 | "shortcut": "Form" 241 | }, 242 | "frame": { 243 | "deprecated": true, 244 | "constructor": "HTMLFrameElement", 245 | "shortcut": "Frame" 246 | }, 247 | "frameset": { 248 | "deprecated": true, 249 | "constructor": "HTMLFrameSetElement", 250 | "shortcut": "FrameSet" 251 | }, 252 | "h1": { 253 | "deprecated": false, 254 | "constructor": "HTMLHeadingElement", 255 | "shortcut": "H1" 256 | }, 257 | "h2": { 258 | "deprecated": false, 259 | "constructor": "HTMLHeadingElement", 260 | "shortcut": "H2" 261 | }, 262 | "h3": { 263 | "deprecated": false, 264 | "constructor": "HTMLHeadingElement", 265 | "shortcut": "H3" 266 | }, 267 | "h4": { 268 | "deprecated": false, 269 | "constructor": "HTMLHeadingElement", 270 | "shortcut": "H4" 271 | }, 272 | "h5": { 273 | "deprecated": false, 274 | "constructor": "HTMLHeadingElement", 275 | "shortcut": "H5" 276 | }, 277 | "h6": { 278 | "deprecated": false, 279 | "constructor": "HTMLHeadingElement", 280 | "shortcut": "H6" 281 | }, 282 | "head": { 283 | "deprecated": false, 284 | "constructor": "HTMLHeadElement", 285 | "shortcut": "Head" 286 | }, 287 | "header": { 288 | "deprecated": false, 289 | "constructor": "HTMLElement", 290 | "shortcut": "Header" 291 | }, 292 | "hr": { 293 | "deprecated": false, 294 | "constructor": "HTMLHRElement", 295 | "shortcut": "HR" 296 | }, 297 | "html": { 298 | "deprecated": false, 299 | "constructor": "HTMLHtmlElement", 300 | "shortcut": "Html" 301 | }, 302 | "i": { 303 | "deprecated": false, 304 | "constructor": "HTMLElement", 305 | "shortcut": "I" 306 | }, 307 | "iframe": { 308 | "deprecated": false, 309 | "constructor": "HTMLIFrameElement", 310 | "shortcut": "IFrame" 311 | }, 312 | "image": { 313 | "deprecated": true, 314 | "constructor": "HTMLUnknownElement", 315 | "shortcut": "Image" 316 | }, 317 | "img": { 318 | "deprecated": false, 319 | "constructor": "HTMLImageElement", 320 | "shortcut": "Img" 321 | }, 322 | "input": { 323 | "deprecated": false, 324 | "constructor": "HTMLInputElement", 325 | "shortcut": "Input" 326 | }, 327 | "ins": { 328 | "deprecated": false, 329 | "constructor": "HTMLModElement", 330 | "shortcut": "Ins" 331 | }, 332 | "kbd": { 333 | "deprecated": false, 334 | "constructor": "HTMLElement", 335 | "shortcut": "Kbd" 336 | }, 337 | "keygen": { 338 | "deprecated": true, 339 | "constructor": "HTMLUnknownElement", 340 | "shortcut": "Keygen" 341 | }, 342 | "label": { 343 | "deprecated": false, 344 | "constructor": "HTMLLabelElement", 345 | "shortcut": "Label" 346 | }, 347 | "legend": { 348 | "deprecated": false, 349 | "constructor": "HTMLLegendElement", 350 | "shortcut": "Legend" 351 | }, 352 | "li": { 353 | "deprecated": false, 354 | "constructor": "HTMLLIElement", 355 | "shortcut": "LI" 356 | }, 357 | "link": { 358 | "deprecated": false, 359 | "constructor": "HTMLLinkElement", 360 | "shortcut": "Link" 361 | }, 362 | "main": { 363 | "deprecated": false, 364 | "constructor": "HTMLElement", 365 | "shortcut": "Main" 366 | }, 367 | "map": { 368 | "deprecated": false, 369 | "constructor": "HTMLMapElement", 370 | "shortcut": "Map" 371 | }, 372 | "mark": { 373 | "deprecated": false, 374 | "constructor": "HTMLElement", 375 | "shortcut": "Mark" 376 | }, 377 | "marquee": { 378 | "deprecated": true, 379 | "constructor": "HTMLMarqueeElement", 380 | "shortcut": "Marquee" 381 | }, 382 | "menu": { 383 | "deprecated": false, 384 | "constructor": "HTMLMenuElement", 385 | "shortcut": "Menu" 386 | }, 387 | "menuitem": { 388 | "deprecated": true, 389 | "constructor": "HTMLUnknownElement", 390 | "shortcut": "MenuItem" 391 | }, 392 | "meta": { 393 | "deprecated": false, 394 | "constructor": "HTMLMetaElement", 395 | "shortcut": "Meta" 396 | }, 397 | "meter": { 398 | "deprecated": false, 399 | "constructor": "HTMLMeterElement", 400 | "shortcut": "Meter" 401 | }, 402 | "nav": { 403 | "deprecated": false, 404 | "constructor": "HTMLElement", 405 | "shortcut": "Nav" 406 | }, 407 | "nobr": { 408 | "deprecated": true, 409 | "constructor": "HTMLElement", 410 | "shortcut": "NoBR" 411 | }, 412 | "noembed": { 413 | "deprecated": true, 414 | "constructor": "HTMLElement", 415 | "shortcut": "NoEmbed" 416 | }, 417 | "noframes": { 418 | "deprecated": true, 419 | "constructor": "HTMLElement", 420 | "shortcut": "NoFrames" 421 | }, 422 | "noscript": { 423 | "deprecated": false, 424 | "constructor": "HTMLElement", 425 | "shortcut": "NoScript" 426 | }, 427 | "object": { 428 | "deprecated": false, 429 | "constructor": "HTMLObjectElement", 430 | "shortcut": "Object" 431 | }, 432 | "ol": { 433 | "deprecated": false, 434 | "constructor": "HTMLOListElement", 435 | "shortcut": "OL" 436 | }, 437 | "optgroup": { 438 | "deprecated": false, 439 | "constructor": "HTMLOptGroupElement", 440 | "shortcut": "OptGroup" 441 | }, 442 | "option": { 443 | "deprecated": false, 444 | "constructor": "HTMLOptionElement", 445 | "shortcut": "Option" 446 | }, 447 | "output": { 448 | "deprecated": false, 449 | "constructor": "HTMLOutputElement", 450 | "shortcut": "Output" 451 | }, 452 | "p": { 453 | "deprecated": false, 454 | "constructor": "HTMLParagraphElement", 455 | "shortcut": "P" 456 | }, 457 | "param": { 458 | "deprecated": true, 459 | "constructor": "HTMLParamElement", 460 | "shortcut": "Param" 461 | }, 462 | "picture": { 463 | "deprecated": false, 464 | "constructor": "HTMLPictureElement", 465 | "shortcut": "Picture" 466 | }, 467 | "plaintext": { 468 | "deprecated": true, 469 | "constructor": "HTMLElement", 470 | "shortcut": "PlainText" 471 | }, 472 | "portal": { 473 | "deprecated": false, 474 | "constructor": "HTMLUnknownElement", 475 | "shortcut": "Portal" 476 | }, 477 | "pre": { 478 | "deprecated": false, 479 | "constructor": "HTMLPreElement", 480 | "shortcut": "Pre" 481 | }, 482 | "progress": { 483 | "deprecated": false, 484 | "constructor": "HTMLProgressElement", 485 | "shortcut": "Progress" 486 | }, 487 | "q": { 488 | "deprecated": false, 489 | "constructor": "HTMLQuoteElement", 490 | "shortcut": "Q" 491 | }, 492 | "rb": { 493 | "deprecated": true, 494 | "constructor": "HTMLElement", 495 | "shortcut": "RB" 496 | }, 497 | "rp": { 498 | "deprecated": false, 499 | "constructor": "HTMLElement", 500 | "shortcut": "RP" 501 | }, 502 | "rt": { 503 | "deprecated": false, 504 | "constructor": "HTMLElement", 505 | "shortcut": "RT" 506 | }, 507 | "rtc": { 508 | "deprecated": true, 509 | "constructor": "HTMLElement", 510 | "shortcut": "RTC" 511 | }, 512 | "ruby": { 513 | "deprecated": false, 514 | "constructor": "HTMLElement", 515 | "shortcut": "Ruby" 516 | }, 517 | "s": { 518 | "deprecated": false, 519 | "constructor": "HTMLElement", 520 | "shortcut": "S" 521 | }, 522 | "samp": { 523 | "deprecated": false, 524 | "constructor": "HTMLElement", 525 | "shortcut": "Samp" 526 | }, 527 | "script": { 528 | "deprecated": false, 529 | "constructor": "HTMLScriptElement", 530 | "shortcut": "Script" 531 | }, 532 | "section": { 533 | "deprecated": false, 534 | "constructor": "HTMLElement", 535 | "shortcut": "Section" 536 | }, 537 | "select": { 538 | "deprecated": false, 539 | "constructor": "HTMLSelectElement", 540 | "shortcut": "Select" 541 | }, 542 | "shadow": { 543 | "deprecated": true, 544 | "constructor": "HTMLUnknownElement", 545 | "shortcut": "Shadow" 546 | }, 547 | "slot": { 548 | "deprecated": false, 549 | "constructor": "HTMLSlotElement", 550 | "shortcut": "Slot" 551 | }, 552 | "small": { 553 | "deprecated": false, 554 | "constructor": "HTMLElement", 555 | "shortcut": "Small" 556 | }, 557 | "source": { 558 | "deprecated": false, 559 | "constructor": "HTMLSourceElement", 560 | "shortcut": "Source" 561 | }, 562 | "spacer": { 563 | "deprecated": true, 564 | "constructor": "HTMLUnknownElement", 565 | "shortcut": "Spacer" 566 | }, 567 | "span": { 568 | "deprecated": false, 569 | "constructor": "HTMLSpanElement", 570 | "shortcut": "Span" 571 | }, 572 | "strike": { 573 | "deprecated": true, 574 | "constructor": "HTMLElement", 575 | "shortcut": "Strike" 576 | }, 577 | "strong": { 578 | "deprecated": false, 579 | "constructor": "HTMLElement", 580 | "shortcut": "Strong" 581 | }, 582 | "style": { 583 | "deprecated": false, 584 | "constructor": "HTMLStyleElement", 585 | "shortcut": "Style" 586 | }, 587 | "sub": { 588 | "deprecated": false, 589 | "constructor": "HTMLElement", 590 | "shortcut": "Sub" 591 | }, 592 | "summary": { 593 | "deprecated": false, 594 | "constructor": "HTMLElement", 595 | "shortcut": "Summary" 596 | }, 597 | "sup": { 598 | "deprecated": false, 599 | "constructor": "HTMLElement", 600 | "shortcut": "Sup" 601 | }, 602 | "table": { 603 | "deprecated": false, 604 | "constructor": "HTMLTableElement", 605 | "shortcut": "Table" 606 | }, 607 | "tbody": { 608 | "deprecated": false, 609 | "constructor": "HTMLTableSectionElement", 610 | "shortcut": "TBody" 611 | }, 612 | "td": { 613 | "deprecated": false, 614 | "constructor": "HTMLTableCellElement", 615 | "shortcut": "TD" 616 | }, 617 | "template": { 618 | "deprecated": false, 619 | "constructor": "HTMLTemplateElement", 620 | "shortcut": "Template" 621 | }, 622 | "textarea": { 623 | "deprecated": false, 624 | "constructor": "HTMLTextAreaElement", 625 | "shortcut": "TextArea" 626 | }, 627 | "tfoot": { 628 | "deprecated": false, 629 | "constructor": "HTMLTableSectionElement", 630 | "shortcut": "TFoot" 631 | }, 632 | "th": { 633 | "deprecated": false, 634 | "constructor": "HTMLTableCellElement", 635 | "shortcut": "TH" 636 | }, 637 | "thead": { 638 | "deprecated": false, 639 | "constructor": "HTMLTableSectionElement", 640 | "shortcut": "THead" 641 | }, 642 | "time": { 643 | "deprecated": false, 644 | "constructor": "HTMLTimeElement", 645 | "shortcut": "Time" 646 | }, 647 | "title": { 648 | "deprecated": false, 649 | "constructor": "HTMLTitleElement", 650 | "shortcut": "Title" 651 | }, 652 | "tr": { 653 | "deprecated": false, 654 | "constructor": "HTMLTableRowElement", 655 | "shortcut": "TR" 656 | }, 657 | "track": { 658 | "deprecated": false, 659 | "constructor": "HTMLTrackElement", 660 | "shortcut": "Track" 661 | }, 662 | "tt": { 663 | "deprecated": true, 664 | "constructor": "HTMLElement", 665 | "shortcut": "TT" 666 | }, 667 | "u": { 668 | "deprecated": false, 669 | "constructor": "HTMLElement", 670 | "shortcut": "U" 671 | }, 672 | "ul": { 673 | "deprecated": false, 674 | "constructor": "HTMLUListElement", 675 | "shortcut": "UL" 676 | }, 677 | "var": { 678 | "deprecated": false, 679 | "constructor": "HTMLElement", 680 | "shortcut": "Var" 681 | }, 682 | "video": { 683 | "deprecated": false, 684 | "constructor": "HTMLVideoElement", 685 | "shortcut": "Video" 686 | }, 687 | "wbr": { 688 | "deprecated": false, 689 | "constructor": "HTMLElement", 690 | "shortcut": "Wbr" 691 | }, 692 | "xmp": { 693 | "deprecated": true, 694 | "constructor": "HTMLPreElement", 695 | "shortcut": "XMP" 696 | } 697 | }); 698 | -------------------------------------------------------------------------------- /esm/index.js: -------------------------------------------------------------------------------- 1 | /*! (c) Andrea Giammarchi - ISC */ 2 | 3 | // ⚠ THIS FILE IS CREATED VIA AUTOMATION 4 | 5 | /** 6 | * @typedef {Object} HTML 7 | * @property {new () => HTMLAnchorElement} A 8 | * @property {new () => HTMLElement} Abbr 9 | * @property {new () => HTMLElement} Address 10 | * @property {new () => HTMLAreaElement} Area 11 | * @property {new () => HTMLElement} Article 12 | * @property {new () => HTMLElement} Aside 13 | * @property {new () => HTMLAudioElement} Audio 14 | * @property {new () => HTMLElement} B 15 | * @property {new () => HTMLBaseElement} Base 16 | * @property {new () => HTMLElement} Bdi 17 | * @property {new () => HTMLElement} Bdo 18 | * @property {new () => HTMLQuoteElement} BlockQuote 19 | * @property {new () => HTMLBodyElement} Body 20 | * @property {new () => HTMLBRElement} BR 21 | * @property {new () => HTMLButtonElement} Button 22 | * @property {new () => HTMLCanvasElement} Canvas 23 | * @property {new () => HTMLTableCaptionElement} Caption 24 | * @property {new () => HTMLElement} Cite 25 | * @property {new () => HTMLElement} Code 26 | * @property {new () => HTMLTableColElement} Col 27 | * @property {new () => HTMLTableColElement} ColGroup 28 | * @property {new () => HTMLDataElement} Data 29 | * @property {new () => HTMLDataListElement} DataList 30 | * @property {new () => HTMLElement} DD 31 | * @property {new () => HTMLModElement} Del 32 | * @property {new () => HTMLDetailsElement} Details 33 | * @property {new () => HTMLElement} Dfn 34 | * @property {new () => HTMLDialogElement} Dialog 35 | * @property {new () => HTMLDivElement} Div 36 | * @property {new () => HTMLDListElement} DL 37 | * @property {new () => HTMLElement} DT 38 | * @property {new () => HTMLElement} Element 39 | * @property {new () => HTMLElement} Em 40 | * @property {new () => HTMLEmbedElement} Embed 41 | * @property {new () => HTMLFieldSetElement} FieldSet 42 | * @property {new () => HTMLElement} FigCaption 43 | * @property {new () => HTMLElement} Figure 44 | * @property {new () => HTMLElement} Footer 45 | * @property {new () => HTMLFormElement} Form 46 | * @property {new () => HTMLHeadingElement} H1 47 | * @property {new () => HTMLHeadingElement} H2 48 | * @property {new () => HTMLHeadingElement} H3 49 | * @property {new () => HTMLHeadingElement} H4 50 | * @property {new () => HTMLHeadingElement} H5 51 | * @property {new () => HTMLHeadingElement} H6 52 | * @property {new () => HTMLHeadElement} Head 53 | * @property {new () => HTMLElement} Header 54 | * @property {new () => HTMLHRElement} HR 55 | * @property {new () => HTMLHtmlElement} Html 56 | * @property {new () => HTMLElement} I 57 | * @property {new () => HTMLIFrameElement} IFrame 58 | * @property {new () => HTMLImageElement} Img 59 | * @property {new () => HTMLInputElement} Input 60 | * @property {new () => HTMLModElement} Ins 61 | * @property {new () => HTMLElement} Kbd 62 | * @property {new () => HTMLLabelElement} Label 63 | * @property {new () => HTMLLegendElement} Legend 64 | * @property {new () => HTMLLIElement} LI 65 | * @property {new () => HTMLLinkElement} Link 66 | * @property {new () => HTMLElement} Main 67 | * @property {new () => HTMLMapElement} Map 68 | * @property {new () => HTMLElement} Mark 69 | * @property {new () => HTMLMenuElement} Menu 70 | * @property {new () => HTMLMetaElement} Meta 71 | * @property {new () => HTMLMeterElement} Meter 72 | * @property {new () => HTMLElement} Nav 73 | * @property {new () => HTMLElement} NoScript 74 | * @property {new () => HTMLObjectElement} Object 75 | * @property {new () => HTMLOListElement} OL 76 | * @property {new () => HTMLOptGroupElement} OptGroup 77 | * @property {new () => HTMLOptionElement} Option 78 | * @property {new () => HTMLOutputElement} Output 79 | * @property {new () => HTMLParagraphElement} P 80 | * @property {new () => HTMLPictureElement} Picture 81 | * @property {new () => HTMLUnknownElement} Portal 82 | * @property {new () => HTMLPreElement} Pre 83 | * @property {new () => HTMLProgressElement} Progress 84 | * @property {new () => HTMLQuoteElement} Q 85 | * @property {new () => HTMLElement} RP 86 | * @property {new () => HTMLElement} RT 87 | * @property {new () => HTMLElement} Ruby 88 | * @property {new () => HTMLElement} S 89 | * @property {new () => HTMLElement} Samp 90 | * @property {new () => HTMLScriptElement} Script 91 | * @property {new () => HTMLElement} Section 92 | * @property {new () => HTMLSelectElement} Select 93 | * @property {new () => HTMLSlotElement} Slot 94 | * @property {new () => HTMLElement} Small 95 | * @property {new () => HTMLSourceElement} Source 96 | * @property {new () => HTMLSpanElement} Span 97 | * @property {new () => HTMLElement} Strong 98 | * @property {new () => HTMLStyleElement} Style 99 | * @property {new () => HTMLElement} Sub 100 | * @property {new () => HTMLElement} Summary 101 | * @property {new () => HTMLElement} Sup 102 | * @property {new () => HTMLTableElement} Table 103 | * @property {new () => HTMLTableSectionElement} TBody 104 | * @property {new () => HTMLTableCellElement} TD 105 | * @property {new () => HTMLTemplateElement} Template 106 | * @property {new () => HTMLTextAreaElement} TextArea 107 | * @property {new () => HTMLTableSectionElement} TFoot 108 | * @property {new () => HTMLTableCellElement} TH 109 | * @property {new () => HTMLTableSectionElement} THead 110 | * @property {new () => HTMLTimeElement} Time 111 | * @property {new () => HTMLTitleElement} Title 112 | * @property {new () => HTMLTableRowElement} TR 113 | * @property {new () => HTMLTrackElement} Track 114 | * @property {new () => HTMLElement} U 115 | * @property {new () => HTMLUListElement} UL 116 | * @property {new () => HTMLElement} Var 117 | * @property {new () => HTMLVideoElement} Video 118 | * @property {new () => HTMLElement} Wbr 119 | */ 120 | 121 | const Anchor = "Anchor"; 122 | const Element = "Element"; 123 | const Quote = "Quote"; 124 | const TableCaption = "TableCaption"; 125 | const TableCol = "TableCol"; 126 | const Mod = "Mod"; 127 | const DList = "DList"; 128 | const Heading = "Heading"; 129 | const Image = "Image"; 130 | const OList = "OList"; 131 | const Paragraph = "Paragraph"; 132 | const Unknown = "Unknown"; 133 | const TableSection = "TableSection"; 134 | const TableCell = "TableCell"; 135 | const TableRow = "TableRow"; 136 | const UList = "UList"; 137 | 138 | /** 139 | * Given an optional global context, returns a proxy that resolves 140 | * all tag names into their global constructors. 141 | * @property {globalThis} [self=globalThis] 142 | * @returns {HTML} 143 | */ 144 | export default (self = globalThis) => new Proxy( 145 | new Map([ 146 | ["a", Anchor], 147 | ["abbr", Element], 148 | ["address", Element], 149 | ["article", Element], 150 | ["aside", Element], 151 | ["b", Element], 152 | ["bdi", Element], 153 | ["bdo", Element], 154 | ["blockquote", Quote], 155 | ["caption", TableCaption], 156 | ["cite", Element], 157 | ["code", Element], 158 | ["col", TableCol], 159 | ["colgroup", TableCol], 160 | ["dd", Element], 161 | ["del", Mod], 162 | ["dfn", Element], 163 | ["dl", DList], 164 | ["dt", Element], 165 | ["em", Element], 166 | ["figcaption", Element], 167 | ["figure", Element], 168 | ["footer", Element], 169 | ["h1", Heading], 170 | ["h2", Heading], 171 | ["h3", Heading], 172 | ["h4", Heading], 173 | ["h5", Heading], 174 | ["h6", Heading], 175 | ["header", Element], 176 | ["i", Element], 177 | ["img", Image], 178 | ["ins", Mod], 179 | ["kbd", Element], 180 | ["main", Element], 181 | ["mark", Element], 182 | ["nav", Element], 183 | ["noscript", Element], 184 | ["ol", OList], 185 | ["p", Paragraph], 186 | ["portal", Unknown], 187 | ["q", Quote], 188 | ["rp", Element], 189 | ["rt", Element], 190 | ["ruby", Element], 191 | ["s", Element], 192 | ["samp", Element], 193 | ["section", Element], 194 | ["small", Element], 195 | ["strong", Element], 196 | ["sub", Element], 197 | ["summary", Element], 198 | ["sup", Element], 199 | ["tbody", TableSection], 200 | ["td", TableCell], 201 | ["tfoot", TableSection], 202 | ["th", TableCell], 203 | ["thead", TableSection], 204 | ["tr", TableRow], 205 | ["u", Element], 206 | ["ul", UList], 207 | ["var", Element], 208 | ["wbr", Element] 209 | ]), 210 | { 211 | get(tags, name) { 212 | const Class = tags.get(name.toLowerCase()) || (name === Element ? '' : name); 213 | return self['HTML' + Class + Element]; 214 | } 215 | } 216 | ); 217 | -------------------------------------------------------------------------------- /esm/names.js: -------------------------------------------------------------------------------- 1 | /*! (c) Andrea Giammarchi - ISC */ 2 | 3 | // ⚠ THIS FILE IS CREATED VIA AUTOMATION 4 | 5 | import proxiedHTMLConstructors from './index.js'; 6 | 7 | /** 8 | * @typedef {Object} HTML 9 | * @property {"HTMLAnchorElement"} A 10 | * @property {"HTMLElement"} Abbr 11 | * @property {"HTMLElement"} Address 12 | * @property {"HTMLAreaElement"} Area 13 | * @property {"HTMLElement"} Article 14 | * @property {"HTMLElement"} Aside 15 | * @property {"HTMLAudioElement"} Audio 16 | * @property {"HTMLElement"} B 17 | * @property {"HTMLBaseElement"} Base 18 | * @property {"HTMLElement"} Bdi 19 | * @property {"HTMLElement"} Bdo 20 | * @property {"HTMLQuoteElement"} BlockQuote 21 | * @property {"HTMLBodyElement"} Body 22 | * @property {"HTMLBRElement"} BR 23 | * @property {"HTMLButtonElement"} Button 24 | * @property {"HTMLCanvasElement"} Canvas 25 | * @property {"HTMLTableCaptionElement"} Caption 26 | * @property {"HTMLElement"} Cite 27 | * @property {"HTMLElement"} Code 28 | * @property {"HTMLTableColElement"} Col 29 | * @property {"HTMLTableColElement"} ColGroup 30 | * @property {"HTMLDataElement"} Data 31 | * @property {"HTMLDataListElement"} DataList 32 | * @property {"HTMLElement"} DD 33 | * @property {"HTMLModElement"} Del 34 | * @property {"HTMLDetailsElement"} Details 35 | * @property {"HTMLElement"} Dfn 36 | * @property {"HTMLDialogElement"} Dialog 37 | * @property {"HTMLDivElement"} Div 38 | * @property {"HTMLDListElement"} DL 39 | * @property {"HTMLElement"} DT 40 | * @property {"HTMLElement"} Element 41 | * @property {"HTMLElement"} Em 42 | * @property {"HTMLEmbedElement"} Embed 43 | * @property {"HTMLFieldSetElement"} FieldSet 44 | * @property {"HTMLElement"} FigCaption 45 | * @property {"HTMLElement"} Figure 46 | * @property {"HTMLElement"} Footer 47 | * @property {"HTMLFormElement"} Form 48 | * @property {"HTMLHeadingElement"} H1 49 | * @property {"HTMLHeadingElement"} H2 50 | * @property {"HTMLHeadingElement"} H3 51 | * @property {"HTMLHeadingElement"} H4 52 | * @property {"HTMLHeadingElement"} H5 53 | * @property {"HTMLHeadingElement"} H6 54 | * @property {"HTMLHeadElement"} Head 55 | * @property {"HTMLElement"} Header 56 | * @property {"HTMLHRElement"} HR 57 | * @property {"HTMLHtmlElement"} Html 58 | * @property {"HTMLElement"} I 59 | * @property {"HTMLIFrameElement"} IFrame 60 | * @property {"HTMLImageElement"} Img 61 | * @property {"HTMLInputElement"} Input 62 | * @property {"HTMLModElement"} Ins 63 | * @property {"HTMLElement"} Kbd 64 | * @property {"HTMLLabelElement"} Label 65 | * @property {"HTMLLegendElement"} Legend 66 | * @property {"HTMLLIElement"} LI 67 | * @property {"HTMLLinkElement"} Link 68 | * @property {"HTMLElement"} Main 69 | * @property {"HTMLMapElement"} Map 70 | * @property {"HTMLElement"} Mark 71 | * @property {"HTMLMenuElement"} Menu 72 | * @property {"HTMLMetaElement"} Meta 73 | * @property {"HTMLMeterElement"} Meter 74 | * @property {"HTMLElement"} Nav 75 | * @property {"HTMLElement"} NoScript 76 | * @property {"HTMLObjectElement"} Object 77 | * @property {"HTMLOListElement"} OL 78 | * @property {"HTMLOptGroupElement"} OptGroup 79 | * @property {"HTMLOptionElement"} Option 80 | * @property {"HTMLOutputElement"} Output 81 | * @property {"HTMLParagraphElement"} P 82 | * @property {"HTMLPictureElement"} Picture 83 | * @property {"HTMLUnknownElement"} Portal 84 | * @property {"HTMLPreElement"} Pre 85 | * @property {"HTMLProgressElement"} Progress 86 | * @property {"HTMLQuoteElement"} Q 87 | * @property {"HTMLElement"} RP 88 | * @property {"HTMLElement"} RT 89 | * @property {"HTMLElement"} Ruby 90 | * @property {"HTMLElement"} S 91 | * @property {"HTMLElement"} Samp 92 | * @property {"HTMLScriptElement"} Script 93 | * @property {"HTMLElement"} Section 94 | * @property {"HTMLSelectElement"} Select 95 | * @property {"HTMLSlotElement"} Slot 96 | * @property {"HTMLElement"} Small 97 | * @property {"HTMLSourceElement"} Source 98 | * @property {"HTMLSpanElement"} Span 99 | * @property {"HTMLElement"} Strong 100 | * @property {"HTMLStyleElement"} Style 101 | * @property {"HTMLElement"} Sub 102 | * @property {"HTMLElement"} Summary 103 | * @property {"HTMLElement"} Sup 104 | * @property {"HTMLTableElement"} Table 105 | * @property {"HTMLTableSectionElement"} TBody 106 | * @property {"HTMLTableCellElement"} TD 107 | * @property {"HTMLTemplateElement"} Template 108 | * @property {"HTMLTextAreaElement"} TextArea 109 | * @property {"HTMLTableSectionElement"} TFoot 110 | * @property {"HTMLTableCellElement"} TH 111 | * @property {"HTMLTableSectionElement"} THead 112 | * @property {"HTMLTimeElement"} Time 113 | * @property {"HTMLTitleElement"} Title 114 | * @property {"HTMLTableRowElement"} TR 115 | * @property {"HTMLTrackElement"} Track 116 | * @property {"HTMLElement"} U 117 | * @property {"HTMLUListElement"} UL 118 | * @property {"HTMLElement"} Var 119 | * @property {"HTMLVideoElement"} Video 120 | * @property {"HTMLElement"} Wbr 121 | */ 122 | 123 | const handler = {get: (_, name) => name}; 124 | 125 | /** @type {HTML} */ 126 | export default proxiedHTMLConstructors(new Proxy(handler, handler)); 127 | -------------------------------------------------------------------------------- /package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "proxied-html-constructors", 3 | "version": "0.2.2", 4 | "description": "A standard based way to retrieve the constructor of any given HTML tag name", 5 | "main": "./cjs/index.js", 6 | "types": "./types/index.d.ts", 7 | "typesVersions": { 8 | ">=4.9": { 9 | "*": [ 10 | "types/*" 11 | ] 12 | } 13 | }, 14 | "scripts": { 15 | "build": "node test/puppeteer.js && npm run cjs && npm run types && npm run test", 16 | "cjs": "ascjs --no-default esm cjs", 17 | "test": "c8 node test/index.js", 18 | "types": "tsc -p ." 19 | }, 20 | "keywords": [ 21 | "tag", 22 | "name", 23 | "constructor", 24 | "HTML" 25 | ], 26 | "author": "Andrea Giammarchi", 27 | "license": "ISC", 28 | "devDependencies": { 29 | "ascjs": "^5.0.1", 30 | "c8": "^7.13.0", 31 | "puppeteer": "^19.7.2", 32 | "typescript": "^4.9.5" 33 | }, 34 | "module": "./esm/index.js", 35 | "type": "module", 36 | "exports": { 37 | ".": { 38 | "types": "./types/index.d.ts", 39 | "import": "./esm/index.js", 40 | "default": "./cjs/index.js" 41 | }, 42 | "./all": { 43 | "types": "./types/all.d.ts", 44 | "import": "./esm/all.js", 45 | "default": "./cjs/all.js" 46 | }, 47 | "./all-names": { 48 | "types": "./types/all-names.d.ts", 49 | "import": "./esm/all-names.js", 50 | "default": "./cjs/all-names.js" 51 | }, 52 | "./data": { 53 | "types": "./types/data.d.ts", 54 | "import": "./esm/data.js", 55 | "default": "./cjs/data.js" 56 | }, 57 | "./names": { 58 | "types": "./types/names.d.ts", 59 | "import": "./esm/names.js", 60 | "default": "./cjs/names.js" 61 | }, 62 | "./package.json": "./package.json" 63 | }, 64 | "repository": { 65 | "type": "git", 66 | "url": "git+https://github.com/WebReflection/proxied-html-constructors.git" 67 | }, 68 | "bugs": { 69 | "url": "https://github.com/WebReflection/proxied-html-constructors/issues" 70 | }, 71 | "homepage": "https://github.com/WebReflection/proxied-html-constructors#readme" 72 | } 73 | -------------------------------------------------------------------------------- /test/index.js: -------------------------------------------------------------------------------- 1 | const assert = (provided, expected, message) => { 2 | if (provided !== expected) { 3 | console.error(message); 4 | process.exit(1); 5 | } 6 | }; 7 | 8 | test(require('../cjs')); 9 | test(require('../cjs/all')); 10 | 11 | function test(proxiedHTMLConstructors) { 12 | const self = { 13 | HTMLAnchorElement: class HTMLAnchorElement {}, 14 | HTMLDivElement: class HTMLDivElement {}, 15 | HTMLElement: class HTMLElement {} 16 | }; 17 | 18 | const HTML = proxiedHTMLConstructors(self); 19 | 20 | assert(HTML.A, self.HTMLAnchorElement, 'HTML.A'); 21 | assert(HTML.Div, self.HTMLDivElement, 'HTML.Div'); 22 | assert(HTML.Element, self.HTMLElement, 'HTML.Element'); 23 | } 24 | 25 | testNames(require('../cjs/names')); 26 | testNames(require('../cjs/all-names')); 27 | 28 | function testNames(HTML) { 29 | assert(HTML.A, 'HTMLAnchorElement', 'HTML.A'); 30 | assert(HTML.Div, 'HTMLDivElement', 'HTML.Div'); 31 | assert(HTML.Element, 'HTMLElement', 'HTML.Element'); 32 | } 33 | -------------------------------------------------------------------------------- /test/package.json: -------------------------------------------------------------------------------- 1 | {"type": "commonjs"} -------------------------------------------------------------------------------- /test/puppeteer.js: -------------------------------------------------------------------------------- 1 | /*! (c) Andrea Giammarchi - ISC */ 2 | 3 | const {writeFileSync} = require('node:fs'); 4 | const {join} = require('node:path'); 5 | 6 | const puppeteer = require('puppeteer'); 7 | const retype = require('./retype.js'); 8 | 9 | (async () => { 10 | const browser = await puppeteer.launch(); 11 | const page = await browser.newPage(); 12 | 13 | await page.goto( 14 | 'https://developer.mozilla.org/en-US/docs/Web/HTML/Element', 15 | {waitUntil: 'load'} 16 | ); 17 | 18 | const data = await page.evaluate(() => { 19 | const data = {element: { 20 | deprecated: false, 21 | constructor: 'HTMLElement', 22 | shortcut: 'Element' 23 | }}; 24 | const reHTML = /^HTML(.*?)Element$/; 25 | const elements = document.querySelectorAll('.table-container > table td:first-of-type code'); 26 | 27 | for (const element of elements) { 28 | // grab clear tag name within angled brackets 29 | const tag = element.textContent.trim().replace(/^<|>$/g, '').toLowerCase(); 30 | 31 | // create an element through the tag to reach its constructor 32 | const {name} = document.createElement(tag).constructor; 33 | 34 | // drop prefix and suffix from the constructor name, fallback to Element 35 | const shortcut = name.replace(reHTML, '$1') || 'Element'; 36 | 37 | data[tag] = { 38 | deprecated: !!element.closest('section[aria-labelledby="obsolete_and_deprecated_elements"]'), 39 | constructor: name, 40 | shortcut: shortcut.toLowerCase() === tag ? shortcut : '' 41 | }; 42 | } 43 | 44 | // return all collected details to the outer process 45 | return data; 46 | }); 47 | 48 | const close = browser.close(); 49 | 50 | const orderedData = {}; 51 | for (const tag of [...Object.keys(data)].sort()) { 52 | if (!data[tag].shortcut) { 53 | if (!retype[tag]) { 54 | switch (tag) { 55 | case 'math': 56 | case 'svg': 57 | continue; 58 | } 59 | throw new TypeError(`Unknown tag: ${tag}`); 60 | } 61 | data[tag].shortcut = retype[tag]; 62 | } 63 | orderedData[tag] = data[tag]; 64 | } 65 | 66 | writeFileSync( 67 | join(__dirname, '..', 'esm', 'data.js'), 68 | `export default (${JSON.stringify(orderedData, null, ' ')});\n` 69 | ); 70 | 71 | // save all found tags and constructors, even those deprecated 72 | saveAs('all', true); 73 | 74 | // save the ceaned up version of the module without obsolete/deprecated 75 | saveAs('index', false); 76 | 77 | function saveAs(name, withDeprecated) { 78 | const warning = '// ⚠ THIS FILE IS CREATED VIA AUTOMATION'; 79 | 80 | const reHTML = /^HTML(.*?)Element$/; 81 | 82 | // simplify minifiers life by referencing once each constructor 83 | const declarations = []; 84 | const knownDeclarations = new Set; 85 | 86 | // use a new Map to proxy 87 | const map = []; 88 | 89 | // create the TypeScript definition of the returned HTML object type 90 | const TS = [`/**`, ` * @typedef {Object} HTML`]; 91 | for (const [tag, {constructor, deprecated, shortcut}] of Object.entries(orderedData)) { 92 | if (!withDeprecated && deprecated) continue; 93 | TS.push(` * @property {new () => ${constructor}} ${shortcut}`); 94 | const name = constructor.replace(reHTML, '$1') || 'Element'; 95 | if (name !== shortcut) { 96 | if (!knownDeclarations.has(name)) { 97 | knownDeclarations.add(name); 98 | declarations.push(`const ${name} = ${JSON.stringify(name)};`); 99 | } 100 | map.push(`[${JSON.stringify(tag)}, ${name}]`); 101 | } 102 | } 103 | TS.push(` */`); 104 | 105 | // save the file 106 | writeFileSync( 107 | join(__dirname, '..', 'esm', name + '.js'), 108 | `/*! (c) Andrea Giammarchi - ISC */ 109 | 110 | ${warning} 111 | 112 | ${TS.join('\n')} 113 | 114 | ${declarations.join('\n')} 115 | 116 | /** 117 | * Given an optional global context, returns a proxy that resolves 118 | * all tag names into their global constructors. 119 | * @property {globalThis} [self=globalThis] 120 | * @returns {HTML} 121 | */ 122 | export default (self = globalThis) => new Proxy( 123 | new Map([ 124 | ${map.join(',\n ')} 125 | ]), 126 | { 127 | get(tags, name) { 128 | const Class = tags.get(name.toLowerCase()) || (name === Element ? '' : name); 129 | return self['HTML' + Class + Element]; 130 | } 131 | } 132 | ); 133 | ` 134 | ); 135 | 136 | // also save the proxied version of the module that returns just strings 137 | // creating a TypeScript definition as Object with Shortcut => HTMLShortcutElement 138 | writeFileSync( 139 | join(__dirname, '..', 'esm', (name === 'index' ? 'names' : 'all-names') + '.js'), 140 | `/*! (c) Andrea Giammarchi - ISC */ 141 | 142 | ${warning} 143 | 144 | import proxiedHTMLConstructors from './${name}.js'; 145 | 146 | ${TS.join('\n').replace(/\{new \(\) => (\S+)\} (\S+)/gm, '{"$1"} $2')} 147 | 148 | const handler = {get: (_, name) => name}; 149 | 150 | /** @type {HTML} */ 151 | export default proxiedHTMLConstructors(new Proxy(handler, handler)); 152 | ` 153 | ); 154 | } 155 | 156 | // enjoy 🥳 157 | await close; 158 | })(); 159 | -------------------------------------------------------------------------------- /test/retype.js: -------------------------------------------------------------------------------- 1 | module.exports = { 2 | "a": "A", 3 | "abbr": "Abbr", 4 | "acronym": "Acronym", 5 | "address": "Address", 6 | "applet": "Applet", 7 | "article": "Article", 8 | "aside": "Aside", 9 | "b": "B", 10 | "bdi": "Bdi", 11 | "bdo": "Bdo", 12 | "bgsound": "BGSound", 13 | "big": "Big", 14 | "blink": "Blink", 15 | "blockquote": "BlockQuote", 16 | "caption": "Caption", 17 | "center": "Center", 18 | "cite": "Cite", 19 | "code": "Code", 20 | "col": "Col", 21 | "colgroup": "ColGroup", 22 | "content": "Content", 23 | "dd": "DD", 24 | "del": "Del", 25 | "dfn": "Dfn", 26 | "dir": "Dir", 27 | "dl": "DL", 28 | "dt": "DT", 29 | "em": "Em", 30 | "figcaption": "FigCaption", 31 | "figure": "Figure", 32 | "footer": "Footer", 33 | "h1": "H1", 34 | "h2": "H2", 35 | "h3": "H3", 36 | "h4": "H4", 37 | "h5": "H5", 38 | "h6": "H6", 39 | "header": "Header", 40 | "i": "I", 41 | "image": "Image", 42 | "img": "Img", 43 | "ins": "Ins", 44 | "kbd": "Kbd", 45 | "keygen": "Keygen", 46 | "main": "Main", 47 | "mark": "Mark", 48 | "menuitem": "MenuItem", 49 | "nav": "Nav", 50 | "nobr": "NoBR", 51 | "noembed": "NoEmbed", 52 | "noframes": "NoFrames", 53 | "noscript": "NoScript", 54 | "ol": "OL", 55 | "p": "P", 56 | "plaintext": "PlainText", 57 | "portal": "Portal", 58 | "q": "Q", 59 | "rb": "RB", 60 | "rp": "RP", 61 | "rt": "RT", 62 | "rtc": "RTC", 63 | "ruby": "Ruby", 64 | "s": "S", 65 | "samp": "Samp", 66 | "section": "Section", 67 | "shadow": "Shadow", 68 | "small": "Small", 69 | "spacer": "Spacer", 70 | "strike": "Strike", 71 | "strong": "Strong", 72 | "sub": "Sub", 73 | "summary": "Summary", 74 | "sup": "Sup", 75 | "tbody": "TBody", 76 | "td": "TD", 77 | "tfoot": "TFoot", 78 | "th": "TH", 79 | "thead": "THead", 80 | "tr": "TR", 81 | "tt": "TT", 82 | "u": "U", 83 | "ul": "UL", 84 | "var": "Var", 85 | "wbr": "Wbr", 86 | "xmp": "XMP" 87 | }; 88 | -------------------------------------------------------------------------------- /tsconfig.json: -------------------------------------------------------------------------------- 1 | { 2 | "compilerOptions": { 3 | "module": "ES2020", 4 | "target": "ES2020", 5 | "moduleResolution": "Classic", 6 | "allowJs": true, 7 | "declaration": true, 8 | "emitDeclarationOnly": true, 9 | "declarationDir": "types" 10 | }, 11 | "include": [ 12 | "esm/**/*.js" 13 | ] 14 | } 15 | -------------------------------------------------------------------------------- /types/all-names.d.ts: -------------------------------------------------------------------------------- 1 | declare const _default: HTML; 2 | export default _default; 3 | export type HTML = { 4 | A: "HTMLAnchorElement"; 5 | Abbr: "HTMLElement"; 6 | Acronym: "HTMLElement"; 7 | Address: "HTMLElement"; 8 | Applet: "HTMLUnknownElement"; 9 | Area: "HTMLAreaElement"; 10 | Article: "HTMLElement"; 11 | Aside: "HTMLElement"; 12 | Audio: "HTMLAudioElement"; 13 | B: "HTMLElement"; 14 | Base: "HTMLBaseElement"; 15 | Bdi: "HTMLElement"; 16 | Bdo: "HTMLElement"; 17 | BGSound: "HTMLUnknownElement"; 18 | Big: "HTMLElement"; 19 | Blink: "HTMLUnknownElement"; 20 | BlockQuote: "HTMLQuoteElement"; 21 | Body: "HTMLBodyElement"; 22 | BR: "HTMLBRElement"; 23 | Button: "HTMLButtonElement"; 24 | Canvas: "HTMLCanvasElement"; 25 | Caption: "HTMLTableCaptionElement"; 26 | Center: "HTMLElement"; 27 | Cite: "HTMLElement"; 28 | Code: "HTMLElement"; 29 | Col: "HTMLTableColElement"; 30 | ColGroup: "HTMLTableColElement"; 31 | Content: "HTMLUnknownElement"; 32 | Data: "HTMLDataElement"; 33 | DataList: "HTMLDataListElement"; 34 | DD: "HTMLElement"; 35 | Del: "HTMLModElement"; 36 | Details: "HTMLDetailsElement"; 37 | Dfn: "HTMLElement"; 38 | Dialog: "HTMLDialogElement"; 39 | Dir: "HTMLDirectoryElement"; 40 | Div: "HTMLDivElement"; 41 | DL: "HTMLDListElement"; 42 | DT: "HTMLElement"; 43 | Element: "HTMLElement"; 44 | Em: "HTMLElement"; 45 | Embed: "HTMLEmbedElement"; 46 | FieldSet: "HTMLFieldSetElement"; 47 | FigCaption: "HTMLElement"; 48 | Figure: "HTMLElement"; 49 | Font: "HTMLFontElement"; 50 | Footer: "HTMLElement"; 51 | Form: "HTMLFormElement"; 52 | Frame: "HTMLFrameElement"; 53 | FrameSet: "HTMLFrameSetElement"; 54 | H1: "HTMLHeadingElement"; 55 | H2: "HTMLHeadingElement"; 56 | H3: "HTMLHeadingElement"; 57 | H4: "HTMLHeadingElement"; 58 | H5: "HTMLHeadingElement"; 59 | H6: "HTMLHeadingElement"; 60 | Head: "HTMLHeadElement"; 61 | Header: "HTMLElement"; 62 | HR: "HTMLHRElement"; 63 | Html: "HTMLHtmlElement"; 64 | I: "HTMLElement"; 65 | IFrame: "HTMLIFrameElement"; 66 | Image: "HTMLUnknownElement"; 67 | Img: "HTMLImageElement"; 68 | Input: "HTMLInputElement"; 69 | Ins: "HTMLModElement"; 70 | Kbd: "HTMLElement"; 71 | Keygen: "HTMLUnknownElement"; 72 | Label: "HTMLLabelElement"; 73 | Legend: "HTMLLegendElement"; 74 | LI: "HTMLLIElement"; 75 | Link: "HTMLLinkElement"; 76 | Main: "HTMLElement"; 77 | Map: "HTMLMapElement"; 78 | Mark: "HTMLElement"; 79 | Marquee: "HTMLMarqueeElement"; 80 | Menu: "HTMLMenuElement"; 81 | MenuItem: "HTMLUnknownElement"; 82 | Meta: "HTMLMetaElement"; 83 | Meter: "HTMLMeterElement"; 84 | Nav: "HTMLElement"; 85 | NoBR: "HTMLElement"; 86 | NoEmbed: "HTMLElement"; 87 | NoFrames: "HTMLElement"; 88 | NoScript: "HTMLElement"; 89 | Object: "HTMLObjectElement"; 90 | OL: "HTMLOListElement"; 91 | OptGroup: "HTMLOptGroupElement"; 92 | Option: "HTMLOptionElement"; 93 | Output: "HTMLOutputElement"; 94 | P: "HTMLParagraphElement"; 95 | Param: "HTMLParamElement"; 96 | Picture: "HTMLPictureElement"; 97 | PlainText: "HTMLElement"; 98 | Portal: "HTMLUnknownElement"; 99 | Pre: "HTMLPreElement"; 100 | Progress: "HTMLProgressElement"; 101 | Q: "HTMLQuoteElement"; 102 | RB: "HTMLElement"; 103 | RP: "HTMLElement"; 104 | RT: "HTMLElement"; 105 | RTC: "HTMLElement"; 106 | Ruby: "HTMLElement"; 107 | S: "HTMLElement"; 108 | Samp: "HTMLElement"; 109 | Script: "HTMLScriptElement"; 110 | Section: "HTMLElement"; 111 | Select: "HTMLSelectElement"; 112 | Shadow: "HTMLUnknownElement"; 113 | Slot: "HTMLSlotElement"; 114 | Small: "HTMLElement"; 115 | Source: "HTMLSourceElement"; 116 | Spacer: "HTMLUnknownElement"; 117 | Span: "HTMLSpanElement"; 118 | Strike: "HTMLElement"; 119 | Strong: "HTMLElement"; 120 | Style: "HTMLStyleElement"; 121 | Sub: "HTMLElement"; 122 | Summary: "HTMLElement"; 123 | Sup: "HTMLElement"; 124 | Table: "HTMLTableElement"; 125 | TBody: "HTMLTableSectionElement"; 126 | TD: "HTMLTableCellElement"; 127 | Template: "HTMLTemplateElement"; 128 | TextArea: "HTMLTextAreaElement"; 129 | TFoot: "HTMLTableSectionElement"; 130 | TH: "HTMLTableCellElement"; 131 | THead: "HTMLTableSectionElement"; 132 | Time: "HTMLTimeElement"; 133 | Title: "HTMLTitleElement"; 134 | TR: "HTMLTableRowElement"; 135 | Track: "HTMLTrackElement"; 136 | TT: "HTMLElement"; 137 | U: "HTMLElement"; 138 | UL: "HTMLUListElement"; 139 | Var: "HTMLElement"; 140 | Video: "HTMLVideoElement"; 141 | Wbr: "HTMLElement"; 142 | XMP: "HTMLPreElement"; 143 | }; 144 | -------------------------------------------------------------------------------- /types/all.d.ts: -------------------------------------------------------------------------------- 1 | declare function _default(self?: typeof globalThis): HTML; 2 | export default _default; 3 | export type HTML = { 4 | A: new () => HTMLAnchorElement; 5 | Abbr: new () => HTMLElement; 6 | Acronym: new () => HTMLElement; 7 | Address: new () => HTMLElement; 8 | Applet: new () => HTMLUnknownElement; 9 | Area: new () => HTMLAreaElement; 10 | Article: new () => HTMLElement; 11 | Aside: new () => HTMLElement; 12 | Audio: new () => HTMLAudioElement; 13 | B: new () => HTMLElement; 14 | Base: new () => HTMLBaseElement; 15 | Bdi: new () => HTMLElement; 16 | Bdo: new () => HTMLElement; 17 | BGSound: new () => HTMLUnknownElement; 18 | Big: new () => HTMLElement; 19 | Blink: new () => HTMLUnknownElement; 20 | BlockQuote: new () => HTMLQuoteElement; 21 | Body: new () => HTMLBodyElement; 22 | BR: new () => HTMLBRElement; 23 | Button: new () => HTMLButtonElement; 24 | Canvas: new () => HTMLCanvasElement; 25 | Caption: new () => HTMLTableCaptionElement; 26 | Center: new () => HTMLElement; 27 | Cite: new () => HTMLElement; 28 | Code: new () => HTMLElement; 29 | Col: new () => HTMLTableColElement; 30 | ColGroup: new () => HTMLTableColElement; 31 | Content: new () => HTMLUnknownElement; 32 | Data: new () => HTMLDataElement; 33 | DataList: new () => HTMLDataListElement; 34 | DD: new () => HTMLElement; 35 | Del: new () => HTMLModElement; 36 | Details: new () => HTMLDetailsElement; 37 | Dfn: new () => HTMLElement; 38 | Dialog: new () => HTMLDialogElement; 39 | Dir: new () => HTMLDirectoryElement; 40 | Div: new () => HTMLDivElement; 41 | DL: new () => HTMLDListElement; 42 | DT: new () => HTMLElement; 43 | Element: new () => HTMLElement; 44 | Em: new () => HTMLElement; 45 | Embed: new () => HTMLEmbedElement; 46 | FieldSet: new () => HTMLFieldSetElement; 47 | FigCaption: new () => HTMLElement; 48 | Figure: new () => HTMLElement; 49 | Font: new () => HTMLFontElement; 50 | Footer: new () => HTMLElement; 51 | Form: new () => HTMLFormElement; 52 | Frame: new () => HTMLFrameElement; 53 | FrameSet: new () => HTMLFrameSetElement; 54 | H1: new () => HTMLHeadingElement; 55 | H2: new () => HTMLHeadingElement; 56 | H3: new () => HTMLHeadingElement; 57 | H4: new () => HTMLHeadingElement; 58 | H5: new () => HTMLHeadingElement; 59 | H6: new () => HTMLHeadingElement; 60 | Head: new () => HTMLHeadElement; 61 | Header: new () => HTMLElement; 62 | HR: new () => HTMLHRElement; 63 | Html: new () => HTMLHtmlElement; 64 | I: new () => HTMLElement; 65 | IFrame: new () => HTMLIFrameElement; 66 | Image: new () => HTMLUnknownElement; 67 | Img: new () => HTMLImageElement; 68 | Input: new () => HTMLInputElement; 69 | Ins: new () => HTMLModElement; 70 | Kbd: new () => HTMLElement; 71 | Keygen: new () => HTMLUnknownElement; 72 | Label: new () => HTMLLabelElement; 73 | Legend: new () => HTMLLegendElement; 74 | LI: new () => HTMLLIElement; 75 | Link: new () => HTMLLinkElement; 76 | Main: new () => HTMLElement; 77 | Map: new () => HTMLMapElement; 78 | Mark: new () => HTMLElement; 79 | Marquee: new () => HTMLMarqueeElement; 80 | Menu: new () => HTMLMenuElement; 81 | MenuItem: new () => HTMLUnknownElement; 82 | Meta: new () => HTMLMetaElement; 83 | Meter: new () => HTMLMeterElement; 84 | Nav: new () => HTMLElement; 85 | NoBR: new () => HTMLElement; 86 | NoEmbed: new () => HTMLElement; 87 | NoFrames: new () => HTMLElement; 88 | NoScript: new () => HTMLElement; 89 | Object: new () => HTMLObjectElement; 90 | OL: new () => HTMLOListElement; 91 | OptGroup: new () => HTMLOptGroupElement; 92 | Option: new () => HTMLOptionElement; 93 | Output: new () => HTMLOutputElement; 94 | P: new () => HTMLParagraphElement; 95 | Param: new () => HTMLParamElement; 96 | Picture: new () => HTMLPictureElement; 97 | PlainText: new () => HTMLElement; 98 | Portal: new () => HTMLUnknownElement; 99 | Pre: new () => HTMLPreElement; 100 | Progress: new () => HTMLProgressElement; 101 | Q: new () => HTMLQuoteElement; 102 | RB: new () => HTMLElement; 103 | RP: new () => HTMLElement; 104 | RT: new () => HTMLElement; 105 | RTC: new () => HTMLElement; 106 | Ruby: new () => HTMLElement; 107 | S: new () => HTMLElement; 108 | Samp: new () => HTMLElement; 109 | Script: new () => HTMLScriptElement; 110 | Section: new () => HTMLElement; 111 | Select: new () => HTMLSelectElement; 112 | Shadow: new () => HTMLUnknownElement; 113 | Slot: new () => HTMLSlotElement; 114 | Small: new () => HTMLElement; 115 | Source: new () => HTMLSourceElement; 116 | Spacer: new () => HTMLUnknownElement; 117 | Span: new () => HTMLSpanElement; 118 | Strike: new () => HTMLElement; 119 | Strong: new () => HTMLElement; 120 | Style: new () => HTMLStyleElement; 121 | Sub: new () => HTMLElement; 122 | Summary: new () => HTMLElement; 123 | Sup: new () => HTMLElement; 124 | Table: new () => HTMLTableElement; 125 | TBody: new () => HTMLTableSectionElement; 126 | TD: new () => HTMLTableCellElement; 127 | Template: new () => HTMLTemplateElement; 128 | TextArea: new () => HTMLTextAreaElement; 129 | TFoot: new () => HTMLTableSectionElement; 130 | TH: new () => HTMLTableCellElement; 131 | THead: new () => HTMLTableSectionElement; 132 | Time: new () => HTMLTimeElement; 133 | Title: new () => HTMLTitleElement; 134 | TR: new () => HTMLTableRowElement; 135 | Track: new () => HTMLTrackElement; 136 | TT: new () => HTMLElement; 137 | U: new () => HTMLElement; 138 | UL: new () => HTMLUListElement; 139 | Var: new () => HTMLElement; 140 | Video: new () => HTMLVideoElement; 141 | Wbr: new () => HTMLElement; 142 | XMP: new () => HTMLPreElement; 143 | }; 144 | -------------------------------------------------------------------------------- /types/data.d.ts: -------------------------------------------------------------------------------- 1 | declare namespace _default { 2 | export namespace a { 3 | const deprecated: boolean; 4 | const constructor: string; 5 | const shortcut: string; 6 | } 7 | export namespace abbr { 8 | const deprecated_1: boolean; 9 | export { deprecated_1 as deprecated }; 10 | const constructor_1: string; 11 | export { constructor_1 as constructor }; 12 | const shortcut_1: string; 13 | export { shortcut_1 as shortcut }; 14 | } 15 | export namespace acronym { 16 | const deprecated_2: boolean; 17 | export { deprecated_2 as deprecated }; 18 | const constructor_2: string; 19 | export { constructor_2 as constructor }; 20 | const shortcut_2: string; 21 | export { shortcut_2 as shortcut }; 22 | } 23 | export namespace address { 24 | const deprecated_3: boolean; 25 | export { deprecated_3 as deprecated }; 26 | const constructor_3: string; 27 | export { constructor_3 as constructor }; 28 | const shortcut_3: string; 29 | export { shortcut_3 as shortcut }; 30 | } 31 | export namespace applet { 32 | const deprecated_4: boolean; 33 | export { deprecated_4 as deprecated }; 34 | const constructor_4: string; 35 | export { constructor_4 as constructor }; 36 | const shortcut_4: string; 37 | export { shortcut_4 as shortcut }; 38 | } 39 | export namespace area { 40 | const deprecated_5: boolean; 41 | export { deprecated_5 as deprecated }; 42 | const constructor_5: string; 43 | export { constructor_5 as constructor }; 44 | const shortcut_5: string; 45 | export { shortcut_5 as shortcut }; 46 | } 47 | export namespace article { 48 | const deprecated_6: boolean; 49 | export { deprecated_6 as deprecated }; 50 | const constructor_6: string; 51 | export { constructor_6 as constructor }; 52 | const shortcut_6: string; 53 | export { shortcut_6 as shortcut }; 54 | } 55 | export namespace aside { 56 | const deprecated_7: boolean; 57 | export { deprecated_7 as deprecated }; 58 | const constructor_7: string; 59 | export { constructor_7 as constructor }; 60 | const shortcut_7: string; 61 | export { shortcut_7 as shortcut }; 62 | } 63 | export namespace audio { 64 | const deprecated_8: boolean; 65 | export { deprecated_8 as deprecated }; 66 | const constructor_8: string; 67 | export { constructor_8 as constructor }; 68 | const shortcut_8: string; 69 | export { shortcut_8 as shortcut }; 70 | } 71 | export namespace b { 72 | const deprecated_9: boolean; 73 | export { deprecated_9 as deprecated }; 74 | const constructor_9: string; 75 | export { constructor_9 as constructor }; 76 | const shortcut_9: string; 77 | export { shortcut_9 as shortcut }; 78 | } 79 | export namespace base { 80 | const deprecated_10: boolean; 81 | export { deprecated_10 as deprecated }; 82 | const constructor_10: string; 83 | export { constructor_10 as constructor }; 84 | const shortcut_10: string; 85 | export { shortcut_10 as shortcut }; 86 | } 87 | export namespace bdi { 88 | const deprecated_11: boolean; 89 | export { deprecated_11 as deprecated }; 90 | const constructor_11: string; 91 | export { constructor_11 as constructor }; 92 | const shortcut_11: string; 93 | export { shortcut_11 as shortcut }; 94 | } 95 | export namespace bdo { 96 | const deprecated_12: boolean; 97 | export { deprecated_12 as deprecated }; 98 | const constructor_12: string; 99 | export { constructor_12 as constructor }; 100 | const shortcut_12: string; 101 | export { shortcut_12 as shortcut }; 102 | } 103 | export namespace bgsound { 104 | const deprecated_13: boolean; 105 | export { deprecated_13 as deprecated }; 106 | const constructor_13: string; 107 | export { constructor_13 as constructor }; 108 | const shortcut_13: string; 109 | export { shortcut_13 as shortcut }; 110 | } 111 | export namespace big { 112 | const deprecated_14: boolean; 113 | export { deprecated_14 as deprecated }; 114 | const constructor_14: string; 115 | export { constructor_14 as constructor }; 116 | const shortcut_14: string; 117 | export { shortcut_14 as shortcut }; 118 | } 119 | export namespace blink { 120 | const deprecated_15: boolean; 121 | export { deprecated_15 as deprecated }; 122 | const constructor_15: string; 123 | export { constructor_15 as constructor }; 124 | const shortcut_15: string; 125 | export { shortcut_15 as shortcut }; 126 | } 127 | export namespace blockquote { 128 | const deprecated_16: boolean; 129 | export { deprecated_16 as deprecated }; 130 | const constructor_16: string; 131 | export { constructor_16 as constructor }; 132 | const shortcut_16: string; 133 | export { shortcut_16 as shortcut }; 134 | } 135 | export namespace body { 136 | const deprecated_17: boolean; 137 | export { deprecated_17 as deprecated }; 138 | const constructor_17: string; 139 | export { constructor_17 as constructor }; 140 | const shortcut_17: string; 141 | export { shortcut_17 as shortcut }; 142 | } 143 | export namespace br { 144 | const deprecated_18: boolean; 145 | export { deprecated_18 as deprecated }; 146 | const constructor_18: string; 147 | export { constructor_18 as constructor }; 148 | const shortcut_18: string; 149 | export { shortcut_18 as shortcut }; 150 | } 151 | export namespace button { 152 | const deprecated_19: boolean; 153 | export { deprecated_19 as deprecated }; 154 | const constructor_19: string; 155 | export { constructor_19 as constructor }; 156 | const shortcut_19: string; 157 | export { shortcut_19 as shortcut }; 158 | } 159 | export namespace canvas { 160 | const deprecated_20: boolean; 161 | export { deprecated_20 as deprecated }; 162 | const constructor_20: string; 163 | export { constructor_20 as constructor }; 164 | const shortcut_20: string; 165 | export { shortcut_20 as shortcut }; 166 | } 167 | export namespace caption { 168 | const deprecated_21: boolean; 169 | export { deprecated_21 as deprecated }; 170 | const constructor_21: string; 171 | export { constructor_21 as constructor }; 172 | const shortcut_21: string; 173 | export { shortcut_21 as shortcut }; 174 | } 175 | export namespace center { 176 | const deprecated_22: boolean; 177 | export { deprecated_22 as deprecated }; 178 | const constructor_22: string; 179 | export { constructor_22 as constructor }; 180 | const shortcut_22: string; 181 | export { shortcut_22 as shortcut }; 182 | } 183 | export namespace cite { 184 | const deprecated_23: boolean; 185 | export { deprecated_23 as deprecated }; 186 | const constructor_23: string; 187 | export { constructor_23 as constructor }; 188 | const shortcut_23: string; 189 | export { shortcut_23 as shortcut }; 190 | } 191 | export namespace code { 192 | const deprecated_24: boolean; 193 | export { deprecated_24 as deprecated }; 194 | const constructor_24: string; 195 | export { constructor_24 as constructor }; 196 | const shortcut_24: string; 197 | export { shortcut_24 as shortcut }; 198 | } 199 | export namespace col { 200 | const deprecated_25: boolean; 201 | export { deprecated_25 as deprecated }; 202 | const constructor_25: string; 203 | export { constructor_25 as constructor }; 204 | const shortcut_25: string; 205 | export { shortcut_25 as shortcut }; 206 | } 207 | export namespace colgroup { 208 | const deprecated_26: boolean; 209 | export { deprecated_26 as deprecated }; 210 | const constructor_26: string; 211 | export { constructor_26 as constructor }; 212 | const shortcut_26: string; 213 | export { shortcut_26 as shortcut }; 214 | } 215 | export namespace content { 216 | const deprecated_27: boolean; 217 | export { deprecated_27 as deprecated }; 218 | const constructor_27: string; 219 | export { constructor_27 as constructor }; 220 | const shortcut_27: string; 221 | export { shortcut_27 as shortcut }; 222 | } 223 | export namespace data { 224 | const deprecated_28: boolean; 225 | export { deprecated_28 as deprecated }; 226 | const constructor_28: string; 227 | export { constructor_28 as constructor }; 228 | const shortcut_28: string; 229 | export { shortcut_28 as shortcut }; 230 | } 231 | export namespace datalist { 232 | const deprecated_29: boolean; 233 | export { deprecated_29 as deprecated }; 234 | const constructor_29: string; 235 | export { constructor_29 as constructor }; 236 | const shortcut_29: string; 237 | export { shortcut_29 as shortcut }; 238 | } 239 | export namespace dd { 240 | const deprecated_30: boolean; 241 | export { deprecated_30 as deprecated }; 242 | const constructor_30: string; 243 | export { constructor_30 as constructor }; 244 | const shortcut_30: string; 245 | export { shortcut_30 as shortcut }; 246 | } 247 | export namespace del { 248 | const deprecated_31: boolean; 249 | export { deprecated_31 as deprecated }; 250 | const constructor_31: string; 251 | export { constructor_31 as constructor }; 252 | const shortcut_31: string; 253 | export { shortcut_31 as shortcut }; 254 | } 255 | export namespace details { 256 | const deprecated_32: boolean; 257 | export { deprecated_32 as deprecated }; 258 | const constructor_32: string; 259 | export { constructor_32 as constructor }; 260 | const shortcut_32: string; 261 | export { shortcut_32 as shortcut }; 262 | } 263 | export namespace dfn { 264 | const deprecated_33: boolean; 265 | export { deprecated_33 as deprecated }; 266 | const constructor_33: string; 267 | export { constructor_33 as constructor }; 268 | const shortcut_33: string; 269 | export { shortcut_33 as shortcut }; 270 | } 271 | export namespace dialog { 272 | const deprecated_34: boolean; 273 | export { deprecated_34 as deprecated }; 274 | const constructor_34: string; 275 | export { constructor_34 as constructor }; 276 | const shortcut_34: string; 277 | export { shortcut_34 as shortcut }; 278 | } 279 | export namespace dir { 280 | const deprecated_35: boolean; 281 | export { deprecated_35 as deprecated }; 282 | const constructor_35: string; 283 | export { constructor_35 as constructor }; 284 | const shortcut_35: string; 285 | export { shortcut_35 as shortcut }; 286 | } 287 | export namespace div { 288 | const deprecated_36: boolean; 289 | export { deprecated_36 as deprecated }; 290 | const constructor_36: string; 291 | export { constructor_36 as constructor }; 292 | const shortcut_36: string; 293 | export { shortcut_36 as shortcut }; 294 | } 295 | export namespace dl { 296 | const deprecated_37: boolean; 297 | export { deprecated_37 as deprecated }; 298 | const constructor_37: string; 299 | export { constructor_37 as constructor }; 300 | const shortcut_37: string; 301 | export { shortcut_37 as shortcut }; 302 | } 303 | export namespace dt { 304 | const deprecated_38: boolean; 305 | export { deprecated_38 as deprecated }; 306 | const constructor_38: string; 307 | export { constructor_38 as constructor }; 308 | const shortcut_38: string; 309 | export { shortcut_38 as shortcut }; 310 | } 311 | export namespace element { 312 | const deprecated_39: boolean; 313 | export { deprecated_39 as deprecated }; 314 | const constructor_39: string; 315 | export { constructor_39 as constructor }; 316 | const shortcut_39: string; 317 | export { shortcut_39 as shortcut }; 318 | } 319 | export namespace em { 320 | const deprecated_40: boolean; 321 | export { deprecated_40 as deprecated }; 322 | const constructor_40: string; 323 | export { constructor_40 as constructor }; 324 | const shortcut_40: string; 325 | export { shortcut_40 as shortcut }; 326 | } 327 | export namespace embed { 328 | const deprecated_41: boolean; 329 | export { deprecated_41 as deprecated }; 330 | const constructor_41: string; 331 | export { constructor_41 as constructor }; 332 | const shortcut_41: string; 333 | export { shortcut_41 as shortcut }; 334 | } 335 | export namespace fieldset { 336 | const deprecated_42: boolean; 337 | export { deprecated_42 as deprecated }; 338 | const constructor_42: string; 339 | export { constructor_42 as constructor }; 340 | const shortcut_42: string; 341 | export { shortcut_42 as shortcut }; 342 | } 343 | export namespace figcaption { 344 | const deprecated_43: boolean; 345 | export { deprecated_43 as deprecated }; 346 | const constructor_43: string; 347 | export { constructor_43 as constructor }; 348 | const shortcut_43: string; 349 | export { shortcut_43 as shortcut }; 350 | } 351 | export namespace figure { 352 | const deprecated_44: boolean; 353 | export { deprecated_44 as deprecated }; 354 | const constructor_44: string; 355 | export { constructor_44 as constructor }; 356 | const shortcut_44: string; 357 | export { shortcut_44 as shortcut }; 358 | } 359 | export namespace font { 360 | const deprecated_45: boolean; 361 | export { deprecated_45 as deprecated }; 362 | const constructor_45: string; 363 | export { constructor_45 as constructor }; 364 | const shortcut_45: string; 365 | export { shortcut_45 as shortcut }; 366 | } 367 | export namespace footer { 368 | const deprecated_46: boolean; 369 | export { deprecated_46 as deprecated }; 370 | const constructor_46: string; 371 | export { constructor_46 as constructor }; 372 | const shortcut_46: string; 373 | export { shortcut_46 as shortcut }; 374 | } 375 | export namespace form { 376 | const deprecated_47: boolean; 377 | export { deprecated_47 as deprecated }; 378 | const constructor_47: string; 379 | export { constructor_47 as constructor }; 380 | const shortcut_47: string; 381 | export { shortcut_47 as shortcut }; 382 | } 383 | export namespace frame { 384 | const deprecated_48: boolean; 385 | export { deprecated_48 as deprecated }; 386 | const constructor_48: string; 387 | export { constructor_48 as constructor }; 388 | const shortcut_48: string; 389 | export { shortcut_48 as shortcut }; 390 | } 391 | export namespace frameset { 392 | const deprecated_49: boolean; 393 | export { deprecated_49 as deprecated }; 394 | const constructor_49: string; 395 | export { constructor_49 as constructor }; 396 | const shortcut_49: string; 397 | export { shortcut_49 as shortcut }; 398 | } 399 | export namespace h1 { 400 | const deprecated_50: boolean; 401 | export { deprecated_50 as deprecated }; 402 | const constructor_50: string; 403 | export { constructor_50 as constructor }; 404 | const shortcut_50: string; 405 | export { shortcut_50 as shortcut }; 406 | } 407 | export namespace h2 { 408 | const deprecated_51: boolean; 409 | export { deprecated_51 as deprecated }; 410 | const constructor_51: string; 411 | export { constructor_51 as constructor }; 412 | const shortcut_51: string; 413 | export { shortcut_51 as shortcut }; 414 | } 415 | export namespace h3 { 416 | const deprecated_52: boolean; 417 | export { deprecated_52 as deprecated }; 418 | const constructor_52: string; 419 | export { constructor_52 as constructor }; 420 | const shortcut_52: string; 421 | export { shortcut_52 as shortcut }; 422 | } 423 | export namespace h4 { 424 | const deprecated_53: boolean; 425 | export { deprecated_53 as deprecated }; 426 | const constructor_53: string; 427 | export { constructor_53 as constructor }; 428 | const shortcut_53: string; 429 | export { shortcut_53 as shortcut }; 430 | } 431 | export namespace h5 { 432 | const deprecated_54: boolean; 433 | export { deprecated_54 as deprecated }; 434 | const constructor_54: string; 435 | export { constructor_54 as constructor }; 436 | const shortcut_54: string; 437 | export { shortcut_54 as shortcut }; 438 | } 439 | export namespace h6 { 440 | const deprecated_55: boolean; 441 | export { deprecated_55 as deprecated }; 442 | const constructor_55: string; 443 | export { constructor_55 as constructor }; 444 | const shortcut_55: string; 445 | export { shortcut_55 as shortcut }; 446 | } 447 | export namespace head { 448 | const deprecated_56: boolean; 449 | export { deprecated_56 as deprecated }; 450 | const constructor_56: string; 451 | export { constructor_56 as constructor }; 452 | const shortcut_56: string; 453 | export { shortcut_56 as shortcut }; 454 | } 455 | export namespace header { 456 | const deprecated_57: boolean; 457 | export { deprecated_57 as deprecated }; 458 | const constructor_57: string; 459 | export { constructor_57 as constructor }; 460 | const shortcut_57: string; 461 | export { shortcut_57 as shortcut }; 462 | } 463 | export namespace hr { 464 | const deprecated_58: boolean; 465 | export { deprecated_58 as deprecated }; 466 | const constructor_58: string; 467 | export { constructor_58 as constructor }; 468 | const shortcut_58: string; 469 | export { shortcut_58 as shortcut }; 470 | } 471 | export namespace html { 472 | const deprecated_59: boolean; 473 | export { deprecated_59 as deprecated }; 474 | const constructor_59: string; 475 | export { constructor_59 as constructor }; 476 | const shortcut_59: string; 477 | export { shortcut_59 as shortcut }; 478 | } 479 | export namespace i { 480 | const deprecated_60: boolean; 481 | export { deprecated_60 as deprecated }; 482 | const constructor_60: string; 483 | export { constructor_60 as constructor }; 484 | const shortcut_60: string; 485 | export { shortcut_60 as shortcut }; 486 | } 487 | export namespace iframe { 488 | const deprecated_61: boolean; 489 | export { deprecated_61 as deprecated }; 490 | const constructor_61: string; 491 | export { constructor_61 as constructor }; 492 | const shortcut_61: string; 493 | export { shortcut_61 as shortcut }; 494 | } 495 | export namespace image { 496 | const deprecated_62: boolean; 497 | export { deprecated_62 as deprecated }; 498 | const constructor_62: string; 499 | export { constructor_62 as constructor }; 500 | const shortcut_62: string; 501 | export { shortcut_62 as shortcut }; 502 | } 503 | export namespace img { 504 | const deprecated_63: boolean; 505 | export { deprecated_63 as deprecated }; 506 | const constructor_63: string; 507 | export { constructor_63 as constructor }; 508 | const shortcut_63: string; 509 | export { shortcut_63 as shortcut }; 510 | } 511 | export namespace input { 512 | const deprecated_64: boolean; 513 | export { deprecated_64 as deprecated }; 514 | const constructor_64: string; 515 | export { constructor_64 as constructor }; 516 | const shortcut_64: string; 517 | export { shortcut_64 as shortcut }; 518 | } 519 | export namespace ins { 520 | const deprecated_65: boolean; 521 | export { deprecated_65 as deprecated }; 522 | const constructor_65: string; 523 | export { constructor_65 as constructor }; 524 | const shortcut_65: string; 525 | export { shortcut_65 as shortcut }; 526 | } 527 | export namespace kbd { 528 | const deprecated_66: boolean; 529 | export { deprecated_66 as deprecated }; 530 | const constructor_66: string; 531 | export { constructor_66 as constructor }; 532 | const shortcut_66: string; 533 | export { shortcut_66 as shortcut }; 534 | } 535 | export namespace keygen { 536 | const deprecated_67: boolean; 537 | export { deprecated_67 as deprecated }; 538 | const constructor_67: string; 539 | export { constructor_67 as constructor }; 540 | const shortcut_67: string; 541 | export { shortcut_67 as shortcut }; 542 | } 543 | export namespace label { 544 | const deprecated_68: boolean; 545 | export { deprecated_68 as deprecated }; 546 | const constructor_68: string; 547 | export { constructor_68 as constructor }; 548 | const shortcut_68: string; 549 | export { shortcut_68 as shortcut }; 550 | } 551 | export namespace legend { 552 | const deprecated_69: boolean; 553 | export { deprecated_69 as deprecated }; 554 | const constructor_69: string; 555 | export { constructor_69 as constructor }; 556 | const shortcut_69: string; 557 | export { shortcut_69 as shortcut }; 558 | } 559 | export namespace li { 560 | const deprecated_70: boolean; 561 | export { deprecated_70 as deprecated }; 562 | const constructor_70: string; 563 | export { constructor_70 as constructor }; 564 | const shortcut_70: string; 565 | export { shortcut_70 as shortcut }; 566 | } 567 | export namespace link { 568 | const deprecated_71: boolean; 569 | export { deprecated_71 as deprecated }; 570 | const constructor_71: string; 571 | export { constructor_71 as constructor }; 572 | const shortcut_71: string; 573 | export { shortcut_71 as shortcut }; 574 | } 575 | export namespace main { 576 | const deprecated_72: boolean; 577 | export { deprecated_72 as deprecated }; 578 | const constructor_72: string; 579 | export { constructor_72 as constructor }; 580 | const shortcut_72: string; 581 | export { shortcut_72 as shortcut }; 582 | } 583 | export namespace map { 584 | const deprecated_73: boolean; 585 | export { deprecated_73 as deprecated }; 586 | const constructor_73: string; 587 | export { constructor_73 as constructor }; 588 | const shortcut_73: string; 589 | export { shortcut_73 as shortcut }; 590 | } 591 | export namespace mark { 592 | const deprecated_74: boolean; 593 | export { deprecated_74 as deprecated }; 594 | const constructor_74: string; 595 | export { constructor_74 as constructor }; 596 | const shortcut_74: string; 597 | export { shortcut_74 as shortcut }; 598 | } 599 | export namespace marquee { 600 | const deprecated_75: boolean; 601 | export { deprecated_75 as deprecated }; 602 | const constructor_75: string; 603 | export { constructor_75 as constructor }; 604 | const shortcut_75: string; 605 | export { shortcut_75 as shortcut }; 606 | } 607 | export namespace menu { 608 | const deprecated_76: boolean; 609 | export { deprecated_76 as deprecated }; 610 | const constructor_76: string; 611 | export { constructor_76 as constructor }; 612 | const shortcut_76: string; 613 | export { shortcut_76 as shortcut }; 614 | } 615 | export namespace menuitem { 616 | const deprecated_77: boolean; 617 | export { deprecated_77 as deprecated }; 618 | const constructor_77: string; 619 | export { constructor_77 as constructor }; 620 | const shortcut_77: string; 621 | export { shortcut_77 as shortcut }; 622 | } 623 | export namespace meta { 624 | const deprecated_78: boolean; 625 | export { deprecated_78 as deprecated }; 626 | const constructor_78: string; 627 | export { constructor_78 as constructor }; 628 | const shortcut_78: string; 629 | export { shortcut_78 as shortcut }; 630 | } 631 | export namespace meter { 632 | const deprecated_79: boolean; 633 | export { deprecated_79 as deprecated }; 634 | const constructor_79: string; 635 | export { constructor_79 as constructor }; 636 | const shortcut_79: string; 637 | export { shortcut_79 as shortcut }; 638 | } 639 | export namespace nav { 640 | const deprecated_80: boolean; 641 | export { deprecated_80 as deprecated }; 642 | const constructor_80: string; 643 | export { constructor_80 as constructor }; 644 | const shortcut_80: string; 645 | export { shortcut_80 as shortcut }; 646 | } 647 | export namespace nobr { 648 | const deprecated_81: boolean; 649 | export { deprecated_81 as deprecated }; 650 | const constructor_81: string; 651 | export { constructor_81 as constructor }; 652 | const shortcut_81: string; 653 | export { shortcut_81 as shortcut }; 654 | } 655 | export namespace noembed { 656 | const deprecated_82: boolean; 657 | export { deprecated_82 as deprecated }; 658 | const constructor_82: string; 659 | export { constructor_82 as constructor }; 660 | const shortcut_82: string; 661 | export { shortcut_82 as shortcut }; 662 | } 663 | export namespace noframes { 664 | const deprecated_83: boolean; 665 | export { deprecated_83 as deprecated }; 666 | const constructor_83: string; 667 | export { constructor_83 as constructor }; 668 | const shortcut_83: string; 669 | export { shortcut_83 as shortcut }; 670 | } 671 | export namespace noscript { 672 | const deprecated_84: boolean; 673 | export { deprecated_84 as deprecated }; 674 | const constructor_84: string; 675 | export { constructor_84 as constructor }; 676 | const shortcut_84: string; 677 | export { shortcut_84 as shortcut }; 678 | } 679 | export namespace object { 680 | const deprecated_85: boolean; 681 | export { deprecated_85 as deprecated }; 682 | const constructor_85: string; 683 | export { constructor_85 as constructor }; 684 | const shortcut_85: string; 685 | export { shortcut_85 as shortcut }; 686 | } 687 | export namespace ol { 688 | const deprecated_86: boolean; 689 | export { deprecated_86 as deprecated }; 690 | const constructor_86: string; 691 | export { constructor_86 as constructor }; 692 | const shortcut_86: string; 693 | export { shortcut_86 as shortcut }; 694 | } 695 | export namespace optgroup { 696 | const deprecated_87: boolean; 697 | export { deprecated_87 as deprecated }; 698 | const constructor_87: string; 699 | export { constructor_87 as constructor }; 700 | const shortcut_87: string; 701 | export { shortcut_87 as shortcut }; 702 | } 703 | export namespace option { 704 | const deprecated_88: boolean; 705 | export { deprecated_88 as deprecated }; 706 | const constructor_88: string; 707 | export { constructor_88 as constructor }; 708 | const shortcut_88: string; 709 | export { shortcut_88 as shortcut }; 710 | } 711 | export namespace output { 712 | const deprecated_89: boolean; 713 | export { deprecated_89 as deprecated }; 714 | const constructor_89: string; 715 | export { constructor_89 as constructor }; 716 | const shortcut_89: string; 717 | export { shortcut_89 as shortcut }; 718 | } 719 | export namespace p { 720 | const deprecated_90: boolean; 721 | export { deprecated_90 as deprecated }; 722 | const constructor_90: string; 723 | export { constructor_90 as constructor }; 724 | const shortcut_90: string; 725 | export { shortcut_90 as shortcut }; 726 | } 727 | export namespace param { 728 | const deprecated_91: boolean; 729 | export { deprecated_91 as deprecated }; 730 | const constructor_91: string; 731 | export { constructor_91 as constructor }; 732 | const shortcut_91: string; 733 | export { shortcut_91 as shortcut }; 734 | } 735 | export namespace picture { 736 | const deprecated_92: boolean; 737 | export { deprecated_92 as deprecated }; 738 | const constructor_92: string; 739 | export { constructor_92 as constructor }; 740 | const shortcut_92: string; 741 | export { shortcut_92 as shortcut }; 742 | } 743 | export namespace plaintext { 744 | const deprecated_93: boolean; 745 | export { deprecated_93 as deprecated }; 746 | const constructor_93: string; 747 | export { constructor_93 as constructor }; 748 | const shortcut_93: string; 749 | export { shortcut_93 as shortcut }; 750 | } 751 | export namespace portal { 752 | const deprecated_94: boolean; 753 | export { deprecated_94 as deprecated }; 754 | const constructor_94: string; 755 | export { constructor_94 as constructor }; 756 | const shortcut_94: string; 757 | export { shortcut_94 as shortcut }; 758 | } 759 | export namespace pre { 760 | const deprecated_95: boolean; 761 | export { deprecated_95 as deprecated }; 762 | const constructor_95: string; 763 | export { constructor_95 as constructor }; 764 | const shortcut_95: string; 765 | export { shortcut_95 as shortcut }; 766 | } 767 | export namespace progress { 768 | const deprecated_96: boolean; 769 | export { deprecated_96 as deprecated }; 770 | const constructor_96: string; 771 | export { constructor_96 as constructor }; 772 | const shortcut_96: string; 773 | export { shortcut_96 as shortcut }; 774 | } 775 | export namespace q { 776 | const deprecated_97: boolean; 777 | export { deprecated_97 as deprecated }; 778 | const constructor_97: string; 779 | export { constructor_97 as constructor }; 780 | const shortcut_97: string; 781 | export { shortcut_97 as shortcut }; 782 | } 783 | export namespace rb { 784 | const deprecated_98: boolean; 785 | export { deprecated_98 as deprecated }; 786 | const constructor_98: string; 787 | export { constructor_98 as constructor }; 788 | const shortcut_98: string; 789 | export { shortcut_98 as shortcut }; 790 | } 791 | export namespace rp { 792 | const deprecated_99: boolean; 793 | export { deprecated_99 as deprecated }; 794 | const constructor_99: string; 795 | export { constructor_99 as constructor }; 796 | const shortcut_99: string; 797 | export { shortcut_99 as shortcut }; 798 | } 799 | export namespace rt { 800 | const deprecated_100: boolean; 801 | export { deprecated_100 as deprecated }; 802 | const constructor_100: string; 803 | export { constructor_100 as constructor }; 804 | const shortcut_100: string; 805 | export { shortcut_100 as shortcut }; 806 | } 807 | export namespace rtc { 808 | const deprecated_101: boolean; 809 | export { deprecated_101 as deprecated }; 810 | const constructor_101: string; 811 | export { constructor_101 as constructor }; 812 | const shortcut_101: string; 813 | export { shortcut_101 as shortcut }; 814 | } 815 | export namespace ruby { 816 | const deprecated_102: boolean; 817 | export { deprecated_102 as deprecated }; 818 | const constructor_102: string; 819 | export { constructor_102 as constructor }; 820 | const shortcut_102: string; 821 | export { shortcut_102 as shortcut }; 822 | } 823 | export namespace s { 824 | const deprecated_103: boolean; 825 | export { deprecated_103 as deprecated }; 826 | const constructor_103: string; 827 | export { constructor_103 as constructor }; 828 | const shortcut_103: string; 829 | export { shortcut_103 as shortcut }; 830 | } 831 | export namespace samp { 832 | const deprecated_104: boolean; 833 | export { deprecated_104 as deprecated }; 834 | const constructor_104: string; 835 | export { constructor_104 as constructor }; 836 | const shortcut_104: string; 837 | export { shortcut_104 as shortcut }; 838 | } 839 | export namespace script { 840 | const deprecated_105: boolean; 841 | export { deprecated_105 as deprecated }; 842 | const constructor_105: string; 843 | export { constructor_105 as constructor }; 844 | const shortcut_105: string; 845 | export { shortcut_105 as shortcut }; 846 | } 847 | export namespace section { 848 | const deprecated_106: boolean; 849 | export { deprecated_106 as deprecated }; 850 | const constructor_106: string; 851 | export { constructor_106 as constructor }; 852 | const shortcut_106: string; 853 | export { shortcut_106 as shortcut }; 854 | } 855 | export namespace select { 856 | const deprecated_107: boolean; 857 | export { deprecated_107 as deprecated }; 858 | const constructor_107: string; 859 | export { constructor_107 as constructor }; 860 | const shortcut_107: string; 861 | export { shortcut_107 as shortcut }; 862 | } 863 | export namespace shadow { 864 | const deprecated_108: boolean; 865 | export { deprecated_108 as deprecated }; 866 | const constructor_108: string; 867 | export { constructor_108 as constructor }; 868 | const shortcut_108: string; 869 | export { shortcut_108 as shortcut }; 870 | } 871 | export namespace slot { 872 | const deprecated_109: boolean; 873 | export { deprecated_109 as deprecated }; 874 | const constructor_109: string; 875 | export { constructor_109 as constructor }; 876 | const shortcut_109: string; 877 | export { shortcut_109 as shortcut }; 878 | } 879 | export namespace small { 880 | const deprecated_110: boolean; 881 | export { deprecated_110 as deprecated }; 882 | const constructor_110: string; 883 | export { constructor_110 as constructor }; 884 | const shortcut_110: string; 885 | export { shortcut_110 as shortcut }; 886 | } 887 | export namespace source { 888 | const deprecated_111: boolean; 889 | export { deprecated_111 as deprecated }; 890 | const constructor_111: string; 891 | export { constructor_111 as constructor }; 892 | const shortcut_111: string; 893 | export { shortcut_111 as shortcut }; 894 | } 895 | export namespace spacer { 896 | const deprecated_112: boolean; 897 | export { deprecated_112 as deprecated }; 898 | const constructor_112: string; 899 | export { constructor_112 as constructor }; 900 | const shortcut_112: string; 901 | export { shortcut_112 as shortcut }; 902 | } 903 | export namespace span { 904 | const deprecated_113: boolean; 905 | export { deprecated_113 as deprecated }; 906 | const constructor_113: string; 907 | export { constructor_113 as constructor }; 908 | const shortcut_113: string; 909 | export { shortcut_113 as shortcut }; 910 | } 911 | export namespace strike { 912 | const deprecated_114: boolean; 913 | export { deprecated_114 as deprecated }; 914 | const constructor_114: string; 915 | export { constructor_114 as constructor }; 916 | const shortcut_114: string; 917 | export { shortcut_114 as shortcut }; 918 | } 919 | export namespace strong { 920 | const deprecated_115: boolean; 921 | export { deprecated_115 as deprecated }; 922 | const constructor_115: string; 923 | export { constructor_115 as constructor }; 924 | const shortcut_115: string; 925 | export { shortcut_115 as shortcut }; 926 | } 927 | export namespace style { 928 | const deprecated_116: boolean; 929 | export { deprecated_116 as deprecated }; 930 | const constructor_116: string; 931 | export { constructor_116 as constructor }; 932 | const shortcut_116: string; 933 | export { shortcut_116 as shortcut }; 934 | } 935 | export namespace sub { 936 | const deprecated_117: boolean; 937 | export { deprecated_117 as deprecated }; 938 | const constructor_117: string; 939 | export { constructor_117 as constructor }; 940 | const shortcut_117: string; 941 | export { shortcut_117 as shortcut }; 942 | } 943 | export namespace summary { 944 | const deprecated_118: boolean; 945 | export { deprecated_118 as deprecated }; 946 | const constructor_118: string; 947 | export { constructor_118 as constructor }; 948 | const shortcut_118: string; 949 | export { shortcut_118 as shortcut }; 950 | } 951 | export namespace sup { 952 | const deprecated_119: boolean; 953 | export { deprecated_119 as deprecated }; 954 | const constructor_119: string; 955 | export { constructor_119 as constructor }; 956 | const shortcut_119: string; 957 | export { shortcut_119 as shortcut }; 958 | } 959 | export namespace table { 960 | const deprecated_120: boolean; 961 | export { deprecated_120 as deprecated }; 962 | const constructor_120: string; 963 | export { constructor_120 as constructor }; 964 | const shortcut_120: string; 965 | export { shortcut_120 as shortcut }; 966 | } 967 | export namespace tbody { 968 | const deprecated_121: boolean; 969 | export { deprecated_121 as deprecated }; 970 | const constructor_121: string; 971 | export { constructor_121 as constructor }; 972 | const shortcut_121: string; 973 | export { shortcut_121 as shortcut }; 974 | } 975 | export namespace td { 976 | const deprecated_122: boolean; 977 | export { deprecated_122 as deprecated }; 978 | const constructor_122: string; 979 | export { constructor_122 as constructor }; 980 | const shortcut_122: string; 981 | export { shortcut_122 as shortcut }; 982 | } 983 | export namespace template { 984 | const deprecated_123: boolean; 985 | export { deprecated_123 as deprecated }; 986 | const constructor_123: string; 987 | export { constructor_123 as constructor }; 988 | const shortcut_123: string; 989 | export { shortcut_123 as shortcut }; 990 | } 991 | export namespace textarea { 992 | const deprecated_124: boolean; 993 | export { deprecated_124 as deprecated }; 994 | const constructor_124: string; 995 | export { constructor_124 as constructor }; 996 | const shortcut_124: string; 997 | export { shortcut_124 as shortcut }; 998 | } 999 | export namespace tfoot { 1000 | const deprecated_125: boolean; 1001 | export { deprecated_125 as deprecated }; 1002 | const constructor_125: string; 1003 | export { constructor_125 as constructor }; 1004 | const shortcut_125: string; 1005 | export { shortcut_125 as shortcut }; 1006 | } 1007 | export namespace th { 1008 | const deprecated_126: boolean; 1009 | export { deprecated_126 as deprecated }; 1010 | const constructor_126: string; 1011 | export { constructor_126 as constructor }; 1012 | const shortcut_126: string; 1013 | export { shortcut_126 as shortcut }; 1014 | } 1015 | export namespace thead { 1016 | const deprecated_127: boolean; 1017 | export { deprecated_127 as deprecated }; 1018 | const constructor_127: string; 1019 | export { constructor_127 as constructor }; 1020 | const shortcut_127: string; 1021 | export { shortcut_127 as shortcut }; 1022 | } 1023 | export namespace time { 1024 | const deprecated_128: boolean; 1025 | export { deprecated_128 as deprecated }; 1026 | const constructor_128: string; 1027 | export { constructor_128 as constructor }; 1028 | const shortcut_128: string; 1029 | export { shortcut_128 as shortcut }; 1030 | } 1031 | export namespace title { 1032 | const deprecated_129: boolean; 1033 | export { deprecated_129 as deprecated }; 1034 | const constructor_129: string; 1035 | export { constructor_129 as constructor }; 1036 | const shortcut_129: string; 1037 | export { shortcut_129 as shortcut }; 1038 | } 1039 | export namespace tr { 1040 | const deprecated_130: boolean; 1041 | export { deprecated_130 as deprecated }; 1042 | const constructor_130: string; 1043 | export { constructor_130 as constructor }; 1044 | const shortcut_130: string; 1045 | export { shortcut_130 as shortcut }; 1046 | } 1047 | export namespace track { 1048 | const deprecated_131: boolean; 1049 | export { deprecated_131 as deprecated }; 1050 | const constructor_131: string; 1051 | export { constructor_131 as constructor }; 1052 | const shortcut_131: string; 1053 | export { shortcut_131 as shortcut }; 1054 | } 1055 | export namespace tt { 1056 | const deprecated_132: boolean; 1057 | export { deprecated_132 as deprecated }; 1058 | const constructor_132: string; 1059 | export { constructor_132 as constructor }; 1060 | const shortcut_132: string; 1061 | export { shortcut_132 as shortcut }; 1062 | } 1063 | export namespace u { 1064 | const deprecated_133: boolean; 1065 | export { deprecated_133 as deprecated }; 1066 | const constructor_133: string; 1067 | export { constructor_133 as constructor }; 1068 | const shortcut_133: string; 1069 | export { shortcut_133 as shortcut }; 1070 | } 1071 | export namespace ul { 1072 | const deprecated_134: boolean; 1073 | export { deprecated_134 as deprecated }; 1074 | const constructor_134: string; 1075 | export { constructor_134 as constructor }; 1076 | const shortcut_134: string; 1077 | export { shortcut_134 as shortcut }; 1078 | } 1079 | export namespace _var { 1080 | const deprecated_135: boolean; 1081 | export { deprecated_135 as deprecated }; 1082 | const constructor_135: string; 1083 | export { constructor_135 as constructor }; 1084 | const shortcut_135: string; 1085 | export { shortcut_135 as shortcut }; 1086 | } 1087 | export { _var as var }; 1088 | export namespace video { 1089 | const deprecated_136: boolean; 1090 | export { deprecated_136 as deprecated }; 1091 | const constructor_136: string; 1092 | export { constructor_136 as constructor }; 1093 | const shortcut_136: string; 1094 | export { shortcut_136 as shortcut }; 1095 | } 1096 | export namespace wbr { 1097 | const deprecated_137: boolean; 1098 | export { deprecated_137 as deprecated }; 1099 | const constructor_137: string; 1100 | export { constructor_137 as constructor }; 1101 | const shortcut_137: string; 1102 | export { shortcut_137 as shortcut }; 1103 | } 1104 | export namespace xmp { 1105 | const deprecated_138: boolean; 1106 | export { deprecated_138 as deprecated }; 1107 | const constructor_138: string; 1108 | export { constructor_138 as constructor }; 1109 | const shortcut_138: string; 1110 | export { shortcut_138 as shortcut }; 1111 | } 1112 | } 1113 | export default _default; 1114 | -------------------------------------------------------------------------------- /types/index.d.ts: -------------------------------------------------------------------------------- 1 | declare function _default(self?: typeof globalThis): HTML; 2 | export default _default; 3 | export type HTML = { 4 | A: new () => HTMLAnchorElement; 5 | Abbr: new () => HTMLElement; 6 | Address: new () => HTMLElement; 7 | Area: new () => HTMLAreaElement; 8 | Article: new () => HTMLElement; 9 | Aside: new () => HTMLElement; 10 | Audio: new () => HTMLAudioElement; 11 | B: new () => HTMLElement; 12 | Base: new () => HTMLBaseElement; 13 | Bdi: new () => HTMLElement; 14 | Bdo: new () => HTMLElement; 15 | BlockQuote: new () => HTMLQuoteElement; 16 | Body: new () => HTMLBodyElement; 17 | BR: new () => HTMLBRElement; 18 | Button: new () => HTMLButtonElement; 19 | Canvas: new () => HTMLCanvasElement; 20 | Caption: new () => HTMLTableCaptionElement; 21 | Cite: new () => HTMLElement; 22 | Code: new () => HTMLElement; 23 | Col: new () => HTMLTableColElement; 24 | ColGroup: new () => HTMLTableColElement; 25 | Data: new () => HTMLDataElement; 26 | DataList: new () => HTMLDataListElement; 27 | DD: new () => HTMLElement; 28 | Del: new () => HTMLModElement; 29 | Details: new () => HTMLDetailsElement; 30 | Dfn: new () => HTMLElement; 31 | Dialog: new () => HTMLDialogElement; 32 | Div: new () => HTMLDivElement; 33 | DL: new () => HTMLDListElement; 34 | DT: new () => HTMLElement; 35 | Element: new () => HTMLElement; 36 | Em: new () => HTMLElement; 37 | Embed: new () => HTMLEmbedElement; 38 | FieldSet: new () => HTMLFieldSetElement; 39 | FigCaption: new () => HTMLElement; 40 | Figure: new () => HTMLElement; 41 | Footer: new () => HTMLElement; 42 | Form: new () => HTMLFormElement; 43 | H1: new () => HTMLHeadingElement; 44 | H2: new () => HTMLHeadingElement; 45 | H3: new () => HTMLHeadingElement; 46 | H4: new () => HTMLHeadingElement; 47 | H5: new () => HTMLHeadingElement; 48 | H6: new () => HTMLHeadingElement; 49 | Head: new () => HTMLHeadElement; 50 | Header: new () => HTMLElement; 51 | HR: new () => HTMLHRElement; 52 | Html: new () => HTMLHtmlElement; 53 | I: new () => HTMLElement; 54 | IFrame: new () => HTMLIFrameElement; 55 | Img: new () => HTMLImageElement; 56 | Input: new () => HTMLInputElement; 57 | Ins: new () => HTMLModElement; 58 | Kbd: new () => HTMLElement; 59 | Label: new () => HTMLLabelElement; 60 | Legend: new () => HTMLLegendElement; 61 | LI: new () => HTMLLIElement; 62 | Link: new () => HTMLLinkElement; 63 | Main: new () => HTMLElement; 64 | Map: new () => HTMLMapElement; 65 | Mark: new () => HTMLElement; 66 | Menu: new () => HTMLMenuElement; 67 | Meta: new () => HTMLMetaElement; 68 | Meter: new () => HTMLMeterElement; 69 | Nav: new () => HTMLElement; 70 | NoScript: new () => HTMLElement; 71 | Object: new () => HTMLObjectElement; 72 | OL: new () => HTMLOListElement; 73 | OptGroup: new () => HTMLOptGroupElement; 74 | Option: new () => HTMLOptionElement; 75 | Output: new () => HTMLOutputElement; 76 | P: new () => HTMLParagraphElement; 77 | Picture: new () => HTMLPictureElement; 78 | Portal: new () => HTMLUnknownElement; 79 | Pre: new () => HTMLPreElement; 80 | Progress: new () => HTMLProgressElement; 81 | Q: new () => HTMLQuoteElement; 82 | RP: new () => HTMLElement; 83 | RT: new () => HTMLElement; 84 | Ruby: new () => HTMLElement; 85 | S: new () => HTMLElement; 86 | Samp: new () => HTMLElement; 87 | Script: new () => HTMLScriptElement; 88 | Section: new () => HTMLElement; 89 | Select: new () => HTMLSelectElement; 90 | Slot: new () => HTMLSlotElement; 91 | Small: new () => HTMLElement; 92 | Source: new () => HTMLSourceElement; 93 | Span: new () => HTMLSpanElement; 94 | Strong: new () => HTMLElement; 95 | Style: new () => HTMLStyleElement; 96 | Sub: new () => HTMLElement; 97 | Summary: new () => HTMLElement; 98 | Sup: new () => HTMLElement; 99 | Table: new () => HTMLTableElement; 100 | TBody: new () => HTMLTableSectionElement; 101 | TD: new () => HTMLTableCellElement; 102 | Template: new () => HTMLTemplateElement; 103 | TextArea: new () => HTMLTextAreaElement; 104 | TFoot: new () => HTMLTableSectionElement; 105 | TH: new () => HTMLTableCellElement; 106 | THead: new () => HTMLTableSectionElement; 107 | Time: new () => HTMLTimeElement; 108 | Title: new () => HTMLTitleElement; 109 | TR: new () => HTMLTableRowElement; 110 | Track: new () => HTMLTrackElement; 111 | U: new () => HTMLElement; 112 | UL: new () => HTMLUListElement; 113 | Var: new () => HTMLElement; 114 | Video: new () => HTMLVideoElement; 115 | Wbr: new () => HTMLElement; 116 | }; 117 | -------------------------------------------------------------------------------- /types/names.d.ts: -------------------------------------------------------------------------------- 1 | declare const _default: HTML; 2 | export default _default; 3 | export type HTML = { 4 | A: "HTMLAnchorElement"; 5 | Abbr: "HTMLElement"; 6 | Address: "HTMLElement"; 7 | Area: "HTMLAreaElement"; 8 | Article: "HTMLElement"; 9 | Aside: "HTMLElement"; 10 | Audio: "HTMLAudioElement"; 11 | B: "HTMLElement"; 12 | Base: "HTMLBaseElement"; 13 | Bdi: "HTMLElement"; 14 | Bdo: "HTMLElement"; 15 | BlockQuote: "HTMLQuoteElement"; 16 | Body: "HTMLBodyElement"; 17 | BR: "HTMLBRElement"; 18 | Button: "HTMLButtonElement"; 19 | Canvas: "HTMLCanvasElement"; 20 | Caption: "HTMLTableCaptionElement"; 21 | Cite: "HTMLElement"; 22 | Code: "HTMLElement"; 23 | Col: "HTMLTableColElement"; 24 | ColGroup: "HTMLTableColElement"; 25 | Data: "HTMLDataElement"; 26 | DataList: "HTMLDataListElement"; 27 | DD: "HTMLElement"; 28 | Del: "HTMLModElement"; 29 | Details: "HTMLDetailsElement"; 30 | Dfn: "HTMLElement"; 31 | Dialog: "HTMLDialogElement"; 32 | Div: "HTMLDivElement"; 33 | DL: "HTMLDListElement"; 34 | DT: "HTMLElement"; 35 | Element: "HTMLElement"; 36 | Em: "HTMLElement"; 37 | Embed: "HTMLEmbedElement"; 38 | FieldSet: "HTMLFieldSetElement"; 39 | FigCaption: "HTMLElement"; 40 | Figure: "HTMLElement"; 41 | Footer: "HTMLElement"; 42 | Form: "HTMLFormElement"; 43 | H1: "HTMLHeadingElement"; 44 | H2: "HTMLHeadingElement"; 45 | H3: "HTMLHeadingElement"; 46 | H4: "HTMLHeadingElement"; 47 | H5: "HTMLHeadingElement"; 48 | H6: "HTMLHeadingElement"; 49 | Head: "HTMLHeadElement"; 50 | Header: "HTMLElement"; 51 | HR: "HTMLHRElement"; 52 | Html: "HTMLHtmlElement"; 53 | I: "HTMLElement"; 54 | IFrame: "HTMLIFrameElement"; 55 | Img: "HTMLImageElement"; 56 | Input: "HTMLInputElement"; 57 | Ins: "HTMLModElement"; 58 | Kbd: "HTMLElement"; 59 | Label: "HTMLLabelElement"; 60 | Legend: "HTMLLegendElement"; 61 | LI: "HTMLLIElement"; 62 | Link: "HTMLLinkElement"; 63 | Main: "HTMLElement"; 64 | Map: "HTMLMapElement"; 65 | Mark: "HTMLElement"; 66 | Menu: "HTMLMenuElement"; 67 | Meta: "HTMLMetaElement"; 68 | Meter: "HTMLMeterElement"; 69 | Nav: "HTMLElement"; 70 | NoScript: "HTMLElement"; 71 | Object: "HTMLObjectElement"; 72 | OL: "HTMLOListElement"; 73 | OptGroup: "HTMLOptGroupElement"; 74 | Option: "HTMLOptionElement"; 75 | Output: "HTMLOutputElement"; 76 | P: "HTMLParagraphElement"; 77 | Picture: "HTMLPictureElement"; 78 | Portal: "HTMLUnknownElement"; 79 | Pre: "HTMLPreElement"; 80 | Progress: "HTMLProgressElement"; 81 | Q: "HTMLQuoteElement"; 82 | RP: "HTMLElement"; 83 | RT: "HTMLElement"; 84 | Ruby: "HTMLElement"; 85 | S: "HTMLElement"; 86 | Samp: "HTMLElement"; 87 | Script: "HTMLScriptElement"; 88 | Section: "HTMLElement"; 89 | Select: "HTMLSelectElement"; 90 | Slot: "HTMLSlotElement"; 91 | Small: "HTMLElement"; 92 | Source: "HTMLSourceElement"; 93 | Span: "HTMLSpanElement"; 94 | Strong: "HTMLElement"; 95 | Style: "HTMLStyleElement"; 96 | Sub: "HTMLElement"; 97 | Summary: "HTMLElement"; 98 | Sup: "HTMLElement"; 99 | Table: "HTMLTableElement"; 100 | TBody: "HTMLTableSectionElement"; 101 | TD: "HTMLTableCellElement"; 102 | Template: "HTMLTemplateElement"; 103 | TextArea: "HTMLTextAreaElement"; 104 | TFoot: "HTMLTableSectionElement"; 105 | TH: "HTMLTableCellElement"; 106 | THead: "HTMLTableSectionElement"; 107 | Time: "HTMLTimeElement"; 108 | Title: "HTMLTitleElement"; 109 | TR: "HTMLTableRowElement"; 110 | Track: "HTMLTrackElement"; 111 | U: "HTMLElement"; 112 | UL: "HTMLUListElement"; 113 | Var: "HTMLElement"; 114 | Video: "HTMLVideoElement"; 115 | Wbr: "HTMLElement"; 116 | }; 117 | --------------------------------------------------------------------------------