Skip to content

Instantly share code, notes, and snippets.

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

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

Select an option

Save Jand42/2c23e62a161c6dcc35f830afc8d43d49 to your computer and use it in GitHub Desktop.
try.ws gist import test
using WebSharper;
using WebSharper.JavaScript;
using WebSharper.UI.Next;
using WebSharper.UI.Next.Client;
using static WebSharper.UI.Next.CSharp.Client.Html;
namespace Samples {
[JavaScript]
public class Program
{
[SPAEntryPoint]
public static void Main()
{
var welcomeText = Var.Create("Welcome gist import");
div(
p(welcomeText),
button(
"Click Me!",
() => { welcomeText.Value = "Hello, world!"; }
)
).RunById("main");
}
}
}
<html>
<head>
<title></title>
</head>
<body>
<div id="main"></div>
<!--[BODY]-->
</body>
</html>
<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