package example

import scala.scalajs.js
import js.Dynamic.{ global => g }
import shared.SharedMessages

object ScalaJSExample extends js.JSApp {
  def main(): Unit = {
    g.document.getElementById("scalajsShoutOut").textContent = SharedMessages.itWorks
  }

  /** Computes the square of an integer.
   *  This demonstrates unit testing.
   */
  def square(x: Int): Int = x*x
}

package example

import scala.scalajs.js
import org.scalajs.dom
import shared.SharedMessages

object ScalaJSExample extends js.JSApp {
  def main(): Unit = {
    dom.document.getElementById("scalajsShoutOut").textContent = SharedMessages.itWorks
  }

  /** Computes the square of an integer.
   *  This demonstrates unit testing.
   */
  def square(x: Int): Int = x*x
}

Use the scalajs dom library
Use the scalajs dom library
