Skip to content

Commit

Permalink
Support Scala 3 (#226)
Browse files Browse the repository at this point in the history
## Changes

* Add Mima to check how much we break binary compatibility.
* Update Mill to version `0.9.10` and fix build deprecations
* Add `scalaMajorVersion` in buildInfoMembers since Scala 3 represents types wrapped inside `()` in error messages.
* Explicitly apply implicit function `ev: A => Frag` in various implicit classes (like `SeqFrag`) since Scala 3 doesn't apply implicitly.
* Remove `protected[this] val RawFrag: Companion[RawFrag]` and `protected[this] val StringFrag: Companion[StringFrag]` since they break variance and Scala 3 is much less permissive with variance. Overriding them with strictier types in subclasses result in compiler errors. Since this was the only use case of `Companion` I removed it as well. Also I failed to  represent `Companion` in Scala 3 since it uses [different signatures for `unapply`](https://dotty.epfl.ch/docs/reference/changed-features/pattern-matching.html)
* Add explicit types to all `implicit` fields as required by Scala 3.
* Replace `def +(other: Any): String` in class `String` with String interpolator since it is not supported in Scala 3
* Make all abstract members in `Tags.scala`, `Tags2.scala` and `SvgTags.scala` `def`s instead of `val`s since Scala 3 doesn't support overriding an abstract `val` member with a `lazy val` as Scalatags does.
* Move the `SourceClasses` class and its companion object to the version specific code. Since it is the only code using macros.
* Updated tests to not use the `* -` utest syntax. Also not supported in Scala 3.
* Move objects used in tests to be stable and not defined in the utest macro. Without this change the Scala 3 version doesn't compile.

## Commits

* Update build system for Scala 3

* Initial Scala 3 (dotty) port

* Only use str-to-str concatenation

There is a bug in the dotty compiler? scala/scala3#13518

scalatags.js[3.0.1,1.7.0].compile java.lang.AssertionError: assertion failed
    scala.runtime.Scala3RunTime$.assertFailed(Scala3RunTime.scala:11)
    dotty.tools.backend.sjs.JSCodeGen.genStringConcat(JSCodeGen.scala:2487)
    dotty.tools.backend.sjs.JSCodeGen.genPrimitiveOp(JSCodeGen.scala:2098)

* Bump to Scala 3.0.0

* wip

* Use string interpolation instead of `+`

* Gitignore /.bsp from Mill BSP

* Remove space in quoted start

* Reduce duplicated code and fix some compilation error

* Remove some lazy vals and revert renames

* Most code compiles

* All code compiling now

* Fix macro to use declaredFields

* Remove pprint

* Remove empty companion objects

* Remove old comment

* Avoid to define lazy val Frags

* Revert some changes not necessary for Scala 3

* Revert formatting change

* Remove unused import

* Revert spurious change

* Remove spurious import

* Refactor filter for ScalaJS versions

Co-authored-by: Sakib Hadžiavdić <sake92@users.noreply.github.com>

Co-authored-by: Edward Wang <edward.c.wang@compdigitec.com>
Co-authored-by: Sakib Hadžiavdić <sake92@users.noreply.github.com>
  • Loading branch information
3 people authored Dec 2, 2021
1 parent 4ec7829 commit 0cfff0c
Show file tree
Hide file tree
Showing 26 changed files with 448 additions and 405 deletions.
13 changes: 12 additions & 1 deletion .github/workflows/actions.yml
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,18 @@ jobs:
sudo apt-get install -y nodejs
npm install
- name: Run tests
run: ./mill -i all __.publishArtifacts __.test
run: ./mill -i --disable-ticker all __.publishArtifacts __.test
check-binary-compatibility:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
with:
fetch-depth: 0
- uses: actions/setup-java@v1
with:
java-version: 8
- name: Check Binary Compatibility
run: ./mill -i --disable-ticker __.mimaReportBinaryIssues

publish-sonatype:
if: github.repository == 'com-lihaoyi/scalatags' && contains(github.ref, 'refs/tags/')
Expand Down
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -11,3 +11,4 @@ readme/target/*
*.iml
out
/node_modules
/.bsp
2 changes: 1 addition & 1 deletion .mill-version
Original file line number Diff line number Diff line change
@@ -1 +1 @@
0.9.5-52-ef6d5d
0.9.10
49 changes: 32 additions & 17 deletions build.sc
Original file line number Diff line number Diff line change
@@ -1,35 +1,43 @@
import mill._, scalalib._, scalajslib._, scalanativelib._, publish._
import $ivy.`com.lihaoyi::mill-contrib-buildinfo:$MILL_VERSION`
import mill.contrib.buildinfo._
import $ivy.`de.tototec::de.tobiasroeser.mill.vcs.version_mill0.9:0.1.1`
import de.tobiasroeser.mill.vcs.version.VcsVersion
import $ivy.`com.github.lolgab::mill-mima_mill0.9:0.0.6`
import com.github.lolgab.mill.mima._
import mill.scalalib.api.Util.isScala3

val dottyVersions = sys.props.get("dottyVersion").toList

val scalaVersions = "2.12.13" :: "2.13.4" :: "2.11.12" :: dottyVersions
val scalaVersions = "2.12.13" :: "2.13.4" :: "2.11.12" :: "3.0.2" :: dottyVersions
val scala2Versions = scalaVersions.filter(_.startsWith("2."))

val scalaJSVersions = for {
scalaV <- scala2Versions
scalaV <- scalaVersions
scalaJSV <- Seq("0.6.33", "1.5.1")
if !(scalaV.startsWith("3.") && scalaJSV.startsWith("0."))
} yield (scalaV, scalaJSV)

val scalaNativeVersions = for {
scalaV <- scala2Versions
scalaNativeV <- Seq("0.4.0")
} yield (scalaV, scalaNativeV)

trait ScalatagsPublishModule extends PublishModule {
trait ScalatagsPublishModule extends PublishModule with Mima {
def artifactName = "scalatags"

def publishVersion = VcsVersion.vcsState().format()

def mimaPreviousVersions = Seq("0.10.0")

def pomSettings = PomSettings(
description = artifactName(),
organization = "com.lihaoyi",
url = "https://github.com/lihaoyi/scalatags",
licenses = Seq(License.MIT),
scm = SCM(
"git://github.com/lihaoyi/scalatags.git",
"scm:git://github.com/lihaoyi/scalatags.git"
versionControl = VersionControl(
browsableRepository = Some("git://github.com/lihaoyi/scalatags.git"),
connection = Some("scm:git://github.com/lihaoyi/scalatags.git")
),
developers = Seq(
Developer("lihaoyi", "Li Haoyi", "https://github.com/lihaoyi")
Expand All @@ -40,12 +48,17 @@ trait ScalatagsPublishModule extends PublishModule {
trait Common extends CrossScalaModule {
def millSourcePath = super.millSourcePath / offset
def ivyDeps = Agg(
ivy"com.lihaoyi::sourcecode::0.2.3",
ivy"com.lihaoyi::geny::0.6.7",
)
def compileIvyDeps = Agg(
ivy"org.scala-lang:scala-reflect:${scalaVersion()}",
ivy"com.lihaoyi::sourcecode::0.2.7",
ivy"com.lihaoyi::geny::0.6.10",
)
def compileIvyDeps = T { super.compileIvyDeps() ++
(
if (isScala3(crossScalaVersion)) Agg()
else Agg(
ivy"org.scala-lang:scala-reflect:${scalaVersion()}"
)
)
}
def offset: os.RelPath = os.rel
def sources = T.sources(
super.sources()
Expand All @@ -58,19 +71,17 @@ trait Common extends CrossScalaModule {
)
}

trait CommonTestModule extends ScalaModule with TestModule {
trait CommonTestModule extends ScalaModule with TestModule.Utest with BuildInfo {
def millSourcePath = super.millSourcePath / os.up
def crossScalaVersion: String
val scalaXmlVersion = if(crossScalaVersion.startsWith("2.11.")) "1.3.0" else "2.0.0-M3"
val scalaXmlVersion = if(crossScalaVersion.startsWith("2.11.")) "1.3.0" else "2.0.1"
def ivyDeps = Agg(
ivy"com.lihaoyi::utest::0.7.7",
ivy"com.lihaoyi::utest::0.7.10",
ivy"org.scala-lang.modules::scala-xml:$scalaXmlVersion"
)
def offset: os.RelPath = os.rel
def testFrameworks = Seq("utest.runner.Framework")
def sources = T.sources(
super.sources()
.++(CrossModuleBase.scalaVersionPaths(crossScalaVersion, s => millSourcePath / s"src-$s" ))
.flatMap(source =>
Seq(
PathRef(source.path / os.up / "test" / source.path.last),
Expand All @@ -79,6 +90,10 @@ trait CommonTestModule extends ScalaModule with TestModule {
)
.distinct
)
override def buildInfoPackageName = Some("scalatags")
override def buildInfoMembers = Map(
"scalaMajorVersion" -> crossScalaVersion.split('.').head
)
}


Expand Down Expand Up @@ -106,7 +121,7 @@ object scalatags extends Module {
def crossScalaVersion = JSScalatagsModule.this.crossScalaVersion
val jsDomNodeJs =
if(crossJSVersion.startsWith("0.6.")) Agg()
else Agg(ivy"org.scala-js::scalajs-env-jsdom-nodejs:1.1.0")
else Agg(ivy"org.scala-js::scalajs-env-jsdom-nodejs:1.1.0").map(_.withDottyCompat(crossScalaVersion))
def ivyDeps = super.ivyDeps() ++ jsDomNodeJs
def jsEnvConfig = mill.scalajslib.api.JsEnvConfig.JsDom()
}
Expand Down
2 changes: 1 addition & 1 deletion mill
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
# This is a wrapper script, that automatically download mill from GitHub release pages
# You can give the required mill version with MILL_VERSION env variable
# If no version is given, it falls back to the value of DEFAULT_MILL_VERSION
DEFAULT_MILL_VERSION=0.9.5-52-ef6d5d
DEFAULT_MILL_VERSION=0.9.10

set -e

Expand Down
18 changes: 8 additions & 10 deletions scalatags/js/src/scalatags/JsDom.scala
Original file line number Diff line number Diff line change
Expand Up @@ -109,31 +109,29 @@ object JsDom

implicit class SeqFrag[A](xs: Seq[A])(implicit ev: A => Frag) extends Frag{
Objects.requireNonNull(xs)
def applyTo(t: dom.Element): Unit = xs.foreach(_.applyTo(t))
def applyTo(t: dom.Element): Unit = xs.foreach(elem => ev(elem).applyTo(t))
def render: dom.Node = {
val frag = org.scalajs.dom.document.createDocumentFragment()
xs.map(_.render).foreach(frag.appendChild)
xs.map(elem => ev(elem).render).foreach(frag.appendChild)
frag
}
}
implicit class GeneratorFrag[A](xs: geny.Generator[A])(implicit ev: A => Frag) extends Frag{
Objects.requireNonNull(xs)
def applyTo(t: dom.Element): Unit = xs.foreach(_.applyTo(t))
def applyTo(t: dom.Element): Unit = xs.foreach(elem => ev(elem).applyTo(t))
def render: dom.Node = {
val frag = org.scalajs.dom.document.createDocumentFragment()
xs.map(_.render).foreach(frag.appendChild)
xs.map(elem => ev(elem).render).foreach(frag.appendChild)
frag
}
}
}

object StringFrag extends Companion[StringFrag]
case class StringFrag(v: String) extends jsdom.Frag{
case class StringFrag(v: String) extends jsdom.Frag {
Objects.requireNonNull(v)
def render: dom.Text = dom.document.createTextNode(v)
}

object RawFrag extends Companion[RawFrag]
case class RawFrag(v: String) extends jsdom.Frag{
Objects.requireNonNull(v)
def render: dom.Node = {
Expand Down Expand Up @@ -178,7 +176,7 @@ object JsDom
def apply(s: Style, v: T) = StylePair(s, v, ev)
}
class GenericPixelStylePx[T](ev: StyleValue[String]) extends PixelStyleValue[T]{
def apply(s: Style, v: T) = StylePair(s, v + "px", ev)
def apply(s: Style, v: T) = StylePair(s, s"${v}px", ev)
}
case class TypedTag[+Output <: dom.Element](tag: String = "",
modifiers: List[Seq[Modifier]],
Expand Down Expand Up @@ -213,9 +211,9 @@ trait LowPriorityImplicits{
t.asInstanceOf[js.Dynamic].updateDynamic(a.name)(v)
}
}
implicit def bindJsAnyLike[T](implicit ev: T => js.Any) = new generic.AttrValue[dom.Element, T]{
implicit def bindJsAnyLike[T](implicit ev: T => js.Any): generic.AttrValue[dom.Element, T] = new generic.AttrValue[dom.Element, T]{
def apply(t: dom.Element, a: generic.Attr, v: T): Unit = {
t.asInstanceOf[js.Dynamic].updateDynamic(a.name)(v)
t.asInstanceOf[js.Dynamic].updateDynamic(a.name)(ev(v))
}
}
implicit class bindNode[T <: dom.Node](e: T) extends generic.Frag[dom.Element, T] {
Expand Down
2 changes: 1 addition & 1 deletion scalatags/js/src/scalatags/jsdom/SvgTags.scala
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ package jsdom
import org.scalajs.dom
import scalatags.generic.{Namespace, Util}
trait SvgTags extends generic.SvgTags[dom.Element, dom.Element, dom.Node] with TagFactory{
implicit lazy val svgNamespaceConfig = Namespace.svgNamespaceConfig
implicit lazy val svgNamespaceConfig: Namespace = Namespace.svgNamespaceConfig
lazy val altGlyph = typedTag[dom.svg.Element]("altGlyph")
lazy val altGlyphDef = typedTag[dom.svg.Element]("altGlyphDef")
lazy val altGlyphItem = typedTag[dom.svg.Element]("altGlyphItem")
Expand Down
142 changes: 71 additions & 71 deletions scalatags/js/src/scalatags/jsdom/Tags.scala
Original file line number Diff line number Diff line change
Expand Up @@ -5,91 +5,91 @@ import org.scalajs.dom
import scalatags.generic.Util
trait Tags extends generic.Tags[dom.Element, dom.Element, dom.Node] with TagFactory{
// Root Element
lazy val html = typedTag[dom.html.Html]("html")
lazy val html: ConcreteHtmlTag[dom.html.Html] = typedTag[dom.html.Html]("html")
// Document Metadata
lazy val head = typedTag[dom.html.Head]("head")
lazy val base = typedTag[dom.html.Base]("base", void = true)
lazy val link = typedTag[dom.html.Link]("link", void = true)
lazy val meta = typedTag[dom.html.Meta]("meta", void = true)
lazy val head: ConcreteHtmlTag[dom.html.Head] = typedTag[dom.html.Head]("head")
lazy val base: ConcreteHtmlTag[dom.html.Base] = typedTag[dom.html.Base]("base", void = true)
lazy val link: ConcreteHtmlTag[dom.html.Link] = typedTag[dom.html.Link]("link", void = true)
lazy val meta: ConcreteHtmlTag[dom.html.Meta] = typedTag[dom.html.Meta]("meta", void = true)
// Scripting
lazy val script = typedTag[dom.html.Script]("script")
lazy val script: ConcreteHtmlTag[dom.html.Script] = typedTag[dom.html.Script]("script")
// Sections
lazy val body = typedTag[dom.html.Body]("body")
lazy val body: ConcreteHtmlTag[dom.html.Body] = typedTag[dom.html.Body]("body")
lazy val h1 = typedTag[dom.html.Heading]("h1")
lazy val h2 = typedTag[dom.html.Heading]("h2")
lazy val h3 = typedTag[dom.html.Heading]("h3")
lazy val h4 = typedTag[dom.html.Heading]("h4")
lazy val h5 = typedTag[dom.html.Heading]("h5")
lazy val h6 = typedTag[dom.html.Heading]("h6")
lazy val header = typedTag[dom.html.Element]("header")
lazy val footer = typedTag[dom.html.Element]("footer")
lazy val header: ConcreteHtmlTag[dom.html.Element] = typedTag[dom.html.Element]("header")
lazy val footer: ConcreteHtmlTag[dom.html.Element] = typedTag[dom.html.Element]("footer")
// Grouping content
lazy val p = typedTag[dom.html.Paragraph]("p")
lazy val hr = typedTag[dom.html.HR]("hr", void = true)
lazy val pre = typedTag[dom.html.Pre]("pre")
lazy val blockquote = typedTag[dom.html.Quote]("blockquote")
lazy val ol = typedTag[dom.html.OList]("ol")
lazy val ul = typedTag[dom.html.UList]("ul")
lazy val li = typedTag[dom.html.LI]("li")
lazy val dl = typedTag[dom.html.DList]("dl")
lazy val dt = typedTag[dom.html.Element]("dt")
lazy val dd = typedTag[dom.html.Element]("dd")
lazy val figure = typedTag[dom.html.Element]("figure")
lazy val figcaption = typedTag[dom.html.Element]("figcaption")
lazy val div = typedTag[dom.html.Div]("div")
lazy val p: ConcreteHtmlTag[dom.html.Paragraph] = typedTag[dom.html.Paragraph]("p")
lazy val hr: ConcreteHtmlTag[dom.html.HR] = typedTag[dom.html.HR]("hr", void = true)
lazy val pre: ConcreteHtmlTag[dom.html.Pre] = typedTag[dom.html.Pre]("pre")
lazy val blockquote: ConcreteHtmlTag[dom.html.Quote] = typedTag[dom.html.Quote]("blockquote")
lazy val ol: ConcreteHtmlTag[dom.html.OList] = typedTag[dom.html.OList]("ol")
lazy val ul: ConcreteHtmlTag[dom.html.UList] = typedTag[dom.html.UList]("ul")
lazy val li: ConcreteHtmlTag[dom.html.LI] = typedTag[dom.html.LI]("li")
lazy val dl: ConcreteHtmlTag[dom.html.DList] = typedTag[dom.html.DList]("dl")
lazy val dt: ConcreteHtmlTag[dom.html.Element] = typedTag[dom.html.Element]("dt")
lazy val dd: ConcreteHtmlTag[dom.html.Element] = typedTag[dom.html.Element]("dd")
lazy val figure: ConcreteHtmlTag[dom.html.Element] = typedTag[dom.html.Element]("figure")
lazy val figcaption: ConcreteHtmlTag[dom.html.Element] = typedTag[dom.html.Element]("figcaption")
lazy val div: ConcreteHtmlTag[dom.html.Div] = typedTag[dom.html.Div]("div")
// Text-level semantics
lazy val a = typedTag[dom.html.Anchor]("a")
lazy val em = typedTag[dom.html.Element]("em")
lazy val strong = typedTag[dom.html.Element]("strong")
lazy val small = typedTag[dom.html.Element]("small")
lazy val s = typedTag[dom.html.Element]("s")
lazy val cite = typedTag[dom.html.Element]("cite")
lazy val code = typedTag[dom.html.Element]("code")
lazy val sub = typedTag[dom.html.Element]("sub")
lazy val sup = typedTag[dom.html.Element]("sup")
lazy val i = typedTag[dom.html.Element]("i")
lazy val b = typedTag[dom.html.Element]("b")
lazy val u = typedTag[dom.html.Element]("u")
lazy val span = typedTag[dom.html.Span]("span")
lazy val br = typedTag[dom.html.BR]("br", void = true)
lazy val wbr = typedTag[dom.html.Element]("wbr", void = true)
lazy val a: ConcreteHtmlTag[dom.html.Anchor] = typedTag[dom.html.Anchor]("a")
lazy val em: ConcreteHtmlTag[dom.html.Element] = typedTag[dom.html.Element]("em")
lazy val strong: ConcreteHtmlTag[dom.html.Element] = typedTag[dom.html.Element]("strong")
lazy val small: ConcreteHtmlTag[dom.html.Element] = typedTag[dom.html.Element]("small")
lazy val s: ConcreteHtmlTag[dom.html.Element] = typedTag[dom.html.Element]("s")
lazy val cite: ConcreteHtmlTag[dom.html.Element] = typedTag[dom.html.Element]("cite")
lazy val code: ConcreteHtmlTag[dom.html.Element] = typedTag[dom.html.Element]("code")
lazy val sub: ConcreteHtmlTag[dom.html.Element] = typedTag[dom.html.Element]("sub")
lazy val sup: ConcreteHtmlTag[dom.html.Element] = typedTag[dom.html.Element]("sup")
lazy val i: ConcreteHtmlTag[dom.html.Element] = typedTag[dom.html.Element]("i")
lazy val b: ConcreteHtmlTag[dom.html.Element] = typedTag[dom.html.Element]("b")
lazy val u: ConcreteHtmlTag[dom.html.Element] = typedTag[dom.html.Element]("u")
lazy val span: ConcreteHtmlTag[dom.html.Span] = typedTag[dom.html.Span]("span")
lazy val br: ConcreteHtmlTag[dom.html.BR] = typedTag[dom.html.BR]("br", void = true)
lazy val wbr: ConcreteHtmlTag[dom.html.Element] = typedTag[dom.html.Element]("wbr", void = true)
// Edits
lazy val ins = typedTag[dom.html.Mod]("ins")
lazy val del = typedTag[dom.html.Mod]("del")
lazy val ins: ConcreteHtmlTag[dom.html.Mod] = typedTag[dom.html.Mod]("ins")
lazy val del: ConcreteHtmlTag[dom.html.Mod] = typedTag[dom.html.Mod]("del")
// Embedded content
lazy val img = typedTag[dom.html.Image]("img", void = true)
lazy val iframe = typedTag[dom.html.IFrame]("iframe")
lazy val embed = typedTag[dom.html.Embed]("embed", void = true)
lazy val img: ConcreteHtmlTag[dom.html.Image] = typedTag[dom.html.Image]("img", void = true)
lazy val iframe: ConcreteHtmlTag[dom.html.IFrame] = typedTag[dom.html.IFrame]("iframe")
lazy val embed: ConcreteHtmlTag[dom.html.Embed] = typedTag[dom.html.Embed]("embed", void = true)
lazy val `object` = typedTag[dom.html.Object]("object")
lazy val param = typedTag[dom.html.Param]("param", void = true)
lazy val video = typedTag[dom.html.Video]("video")
lazy val audio = typedTag[dom.html.Audio]("audio")
lazy val source = typedTag[dom.html.Source]("source", void = true)
lazy val track = typedTag[dom.html.Track]("track", void = true)
lazy val canvas = typedTag[dom.html.Canvas]("canvas")
lazy val map = typedTag[dom.html.Map]("map")
lazy val area = typedTag[dom.html.Area]("area", void = true)
lazy val param: ConcreteHtmlTag[dom.html.Param] = typedTag[dom.html.Param]("param", void = true)
lazy val video: ConcreteHtmlTag[dom.html.Video] = typedTag[dom.html.Video]("video")
lazy val audio: ConcreteHtmlTag[dom.html.Audio] = typedTag[dom.html.Audio]("audio")
lazy val source: ConcreteHtmlTag[dom.html.Source] = typedTag[dom.html.Source]("source", void = true)
lazy val track: ConcreteHtmlTag[dom.html.Track] = typedTag[dom.html.Track]("track", void = true)
lazy val canvas: ConcreteHtmlTag[dom.html.Canvas] = typedTag[dom.html.Canvas]("canvas")
lazy val map: ConcreteHtmlTag[dom.html.Map] = typedTag[dom.html.Map]("map")
lazy val area: ConcreteHtmlTag[dom.html.Area] = typedTag[dom.html.Area]("area", void = true)
// Tabular data
lazy val table = typedTag[dom.html.Table]("table")
lazy val caption = typedTag[dom.html.TableCaption]("caption")
lazy val colgroup = typedTag[dom.html.TableCol]("colgroup")
lazy val col = typedTag[dom.html.TableCol]("col", void = true)
lazy val tbody = typedTag[dom.html.TableSection]("tbody")
lazy val thead = typedTag[dom.html.TableSection]("thead")
lazy val tfoot = typedTag[dom.html.TableSection]("tfoot")
lazy val tr = typedTag[dom.html.TableRow]("tr")
lazy val td = typedTag[dom.html.TableCell]("td")
lazy val th = typedTag[dom.html.TableCell]("th")
lazy val table: ConcreteHtmlTag[dom.html.Table] = typedTag[dom.html.Table]("table")
lazy val caption: ConcreteHtmlTag[dom.html.TableCaption] = typedTag[dom.html.TableCaption]("caption")
lazy val colgroup: ConcreteHtmlTag[dom.html.TableCol] = typedTag[dom.html.TableCol]("colgroup")
lazy val col: ConcreteHtmlTag[dom.html.TableCol] = typedTag[dom.html.TableCol]("col", void = true)
lazy val tbody: ConcreteHtmlTag[dom.html.TableSection] = typedTag[dom.html.TableSection]("tbody")
lazy val thead: ConcreteHtmlTag[dom.html.TableSection] = typedTag[dom.html.TableSection]("thead")
lazy val tfoot: ConcreteHtmlTag[dom.html.TableSection] = typedTag[dom.html.TableSection]("tfoot")
lazy val tr: ConcreteHtmlTag[dom.html.TableRow] = typedTag[dom.html.TableRow]("tr")
lazy val td: ConcreteHtmlTag[dom.html.TableCell] = typedTag[dom.html.TableCell]("td")
lazy val th: ConcreteHtmlTag[dom.html.TableCell] = typedTag[dom.html.TableCell]("th")
// Forms
lazy val form = typedTag[dom.html.Form]("form")
lazy val fieldset = typedTag[dom.html.FieldSet]("fieldset")
lazy val legend = typedTag[dom.html.Legend]("legend")
lazy val label = typedTag[dom.html.Label]("label")
lazy val input = typedTag[dom.html.Input]("input", void = true)
lazy val button = typedTag[dom.html.Button]("button")
lazy val select = typedTag[dom.html.Select]("select")
lazy val datalist = typedTag[dom.html.DataList]("datalist")
lazy val optgroup = typedTag[dom.html.OptGroup]("optgroup")
lazy val option = typedTag[dom.html.Option]("option")
lazy val textarea = typedTag[dom.html.TextArea]("textarea")
lazy val form: ConcreteHtmlTag[dom.html.Form] = typedTag[dom.html.Form]("form")
lazy val fieldset: ConcreteHtmlTag[dom.html.FieldSet] = typedTag[dom.html.FieldSet]("fieldset")
lazy val legend: ConcreteHtmlTag[dom.html.Legend] = typedTag[dom.html.Legend]("legend")
lazy val label: ConcreteHtmlTag[dom.html.Label] = typedTag[dom.html.Label]("label")
lazy val input: ConcreteHtmlTag[dom.html.Input] = typedTag[dom.html.Input]("input", void = true)
lazy val button: ConcreteHtmlTag[dom.html.Button] = typedTag[dom.html.Button]("button")
lazy val select: ConcreteHtmlTag[dom.html.Select] = typedTag[dom.html.Select]("select")
lazy val datalist: ConcreteHtmlTag[dom.html.DataList] = typedTag[dom.html.DataList]("datalist")
lazy val optgroup: ConcreteHtmlTag[dom.html.OptGroup] = typedTag[dom.html.OptGroup]("optgroup")
lazy val option: ConcreteHtmlTag[dom.html.Option] = typedTag[dom.html.Option]("option")
lazy val textarea: ConcreteHtmlTag[dom.html.TextArea] = typedTag[dom.html.TextArea]("textarea")
}
Loading

0 comments on commit 0cfff0c

Please sign in to comment.