summaryrefslogtreecommitdiff
path: root/examples/demos/src/main/scala/webpage/HelloWorld1.scala
blob: f897c981101f9a7fe8af8d9e5db63e83e66e944e (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
package webpage
import org.scalajs.dom
import scalajs.js.annotation.JSExport
import scalatags.JsDom.all._
@JSExport
object HelloWorld1 extends{
  @JSExport
  def main(target: dom.HTMLDivElement) = {
    val (animalA, animalB) = ("fox", "dog")
    target.appendChild(
      div(
        h1("Hello World!"),
        p(
          "The quick brown ", b(animalA),
          " jumps over the lazy ",
          i(animalB), "."
        )
      ).render
    )
  }
}