Skip to content

Instantly share code, notes, and snippets.

@jhegedus42
Last active October 8, 2016 13:09
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save jhegedus42/287e6b24228bda786cf6ef8cce63cd3a to your computer and use it in GitHub Desktop.
Save jhegedus42/287e6b24228bda786cf6ef8cce63cd3a to your computer and use it in GitHub Desktop.
@js.native
trait Window extends js.Object {
def alert(message: String): Unit = js.native
}
@js.native
@JSName("window")
object W extends Window
object ScalaJSExample extends js.JSApp {
def main(): Unit = {
W.alert("bla")
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment