Skip to content

Instantly share code, notes, and snippets.

@alexspurling
Last active September 15, 2015 13:13
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 alexspurling/060e1e23f7e2664295a3 to your computer and use it in GitHub Desktop.
Save alexspurling/060e1e23f7e2664295a3 to your computer and use it in GitHub Desktop.
Port initial value example
<!DOCTYPE HTML>
<html>
<head>
<meta charset="UTF-8">
<title>Test</title>
<script type="text/javascript" src="elm.js"></script>
<link rel="stylesheet" href="style.css">
</head>
<body>
</body>
<script type="text/javascript">
var app = Elm.fullscreen(Elm.InitialValues, {timestamp: new Date().getTime()});
</script>
</html>
module InitialValues where
import Graphics.Element exposing (..)
port timestamp : Int
main =
show ("Hello" ++ (toString (timestamp + 2)))
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment