Skip to content

Instantly share code, notes, and snippets.

@fgaz
Created January 26, 2016 14:31
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 fgaz/ccf17d4ae472e439080a to your computer and use it in GitHub Desktop.
Save fgaz/ccf17d4ae472e439080a to your computer and use it in GitHub Desktop.
Hello, GHCJS!
import GHCJS.DOM (webViewGetDomDocument, runWebGUI)
import GHCJS.DOM.Document (getBody)
import GHCJS.DOM.Element (setInnerHTML)
main :: IO ()
main = runWebGUI $ \ webView -> do
Just doc <- webViewGetDomDocument webView
Just body <- getBody doc
setInnerHTML body (Just "<h1>Hello, GHCJS!</h1>")
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment