Skip to content

Instantly share code, notes, and snippets.

@Jand42
Last active July 12, 2016 15:44
Show Gist options
  • Select an option

  • Save Jand42/fc0b5dda0e20c6d369f7779ea7ac3bc9 to your computer and use it in GitHub Desktop.

Select an option

Save Jand42/fc0b5dda0e20c6d369f7779ea7ac3bc9 to your computer and use it in GitHub Desktop.
try.ws f# gist import test
namespace Samples
open WebSharper
open WebSharper.JavaScript
open WebSharper.UI.Next
open WebSharper.UI.Next.Html
open WebSharper.UI.Next.Client
[<JavaScript>]
module HelloWorld =
let Main =
let welcome = p [text "Welcome gist import"]
div [
welcome
buttonAttr [
on.click (fun _ _ ->
welcome.Text <- "Hello, world!")
] [
text "Click Me!"
]
]
|> Doc.RunById "main"
<html>
<head>
<title></title>
</head>
<body>
<div id="main"></div>
<!--[BODY]-->
</body>
</html>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment