Skip to content

Commit

Permalink
literal type proposal
Browse files Browse the repository at this point in the history
  • Loading branch information
Quafadas committed Oct 1, 2024
1 parent 53f9a1a commit b5c8b4a
Showing 1 changed file with 61 additions and 0 deletions.
61 changes: 61 additions & 0 deletions dom/src/main/scala-3/org/scalajs/dom/HtmlLiterals.scala
Original file line number Diff line number Diff line change
@@ -0,0 +1,61 @@
package org.scalajs.dom

/** Short aliases of all the dom.HTMLThing classes */
object HTMLLiterals {
def createElement(tagName: "a"): HTMLAnchorElement = js.native
def createElement(tagName: "audio"): HTMLAudioElement = js.native
def createElement(tagName: "area"): HTMLAreaElement = js.native
def createElement(tagName: "base"): HTMLBaseElement = js.native
def createElement(tagName: "body"): HTMLBodyElement = js.native
def createElement(tagName: "button"): HTMLButtonElement = js.native
def createElement(tagName: "br"): HTMLBRElement = js.native
def createElement(tagName: "canvas"): HTMLCanvasElement = js.native
def createElement(tagName: "datalist"): HTMLDataListElement = js.native
def createElement(tagName: "div"): HTMLDivElement = js.native
def createElement(tagName: "dialog"): HTMLDialogElement = js.native
def createElement(tagName: "dl"): HTMLDListElement = js.native
def createElement(tagName: "embed"): HTMLEmbedElement = js.native
def createElement(tagName: "fieldset"): HTMLFieldSetElement = js.native
def createElement(tagName: "form"): HTMLFormElement = js.native
def createElement(tagName: "head"): HTMLHeadElement = js.native
def createElement(tagName: "h1"): HTMLHeadingElement = js.native
def createElement(tagName: "html"): HTMLHtmlElement = js.native
def createElement(tagName: "hr"): HTMLHRElement = js.native
def createElement(tagName: "iframe"): HTMLIFrameElement = js.native
def createElement(tagName: "img"): HTMLImageElement = js.native
def createElement(tagName: "input"): HTMLInputElement = js.native
def createElement(tagName: "label"): HTMLLabelElement = js.native
def createElement(tagName: "legend"): HTMLLegendElement = js.native
def createElement(tagName: "li"): HTMLLIElement = js.native
def createElement(tagName: "link"): HTMLLinkElement = js.native
def createElement(tagName: "map"): HTMLMapElement = js.native
def createElement(tagName: "menu"): HTMLMenuElement = js.native
def createElement(tagName: "meta"): HTMLMetaElement = js.native
def createElement(tagName: "mod"): HTMLModElement = js.native
def createElement(tagName: "object"): HTMLObjectElement = js.native
def createElement(tagName: "ol"): HTMLOListElement = js.native
def createElement(tagName: "optgroup"): HTMLOptGroupElement = js.native
def createElement(tagName: "option"): HTMLOptionElement = js.native
def createElement(tagName: "p"): HTMLParagraphElement = js.native
def createElement(tagName: "param"): HTMLParamElement = js.native
def createElement(tagName: "pre"): HTMLPreElement = js.native
def createElement(tagName: "progress"): HTMLProgressElement = js.native
def createElement(tagName: "blockquote"): HTMLQuoteElement = js.native
def createElement(tagName: "script"): HTMLScriptElement = js.native
def createElement(tagName: "select"): HTMLSelectElement = js.native
def createElement(tagName: "source"): HTMLSourceElement = js.native
def createElement(tagName: "span"): HTMLSpanElement = js.native
def createElement(tagName: "style"): HTMLStyleElement = js.native
def createElement(tagName: "table"): HTMLTableElement = js.native
def createElement(tagName: "caption"): HTMLTableCaptionElement = js.native
def createElement(tagName: "td"): HTMLTableCellElement = js.native
def createElement(tagName: "col"): HTMLTableColElement = js.native
def createElement(tagName: "tr"): HTMLTableRowElement = js.native
def createElement(tagName: "tbody"): HTMLTableSectionElement = js.native
def createElement(tagName: "title"): HTMLTitleElement = js.native
def createElement(tagName: "textarea"): HTMLTextAreaElement = js.native
def createElement(tagName: "track"): HTMLTrackElement = js.native
def createElement(tagName: "ul"): HTMLUListElement = js.native
def createElement(tagName: "unknown"): HTMLUnknownElement = js.native
def createElement(tagName: "video"): HTMLVideoElement = js.native
}

0 comments on commit b5c8b4a

Please sign in to comment.