Skip to content

Instantly share code, notes, and snippets.

@nagat01
Created June 30, 2014 11:49
  • Star 1 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
Star You must be signed in to star a gist
Save nagat01/2163d81e457ac9ca6669 to your computer and use it in GitHub Desktop.
// dom types
import org.scalajs.dom._
// global
import scala.scalajs.js.Dynamic.global
// document with good type
val document = global.document.asInstanceOf[Document]
// body with good type
val body = document.getElementsByTagName("body").item(0).asInstanceOf[HTMLElement]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment