package html5_test import ( "gitlab.codemonkeysoftware.net/b/hatmill" html5 "gitlab.codemonkeysoftware.net/b/hatmill/html5" "html" "os" ) func Example() { userInput := "" document := html5.Html()( html5.Head()(), html5.Body()( html5.Div()( html5.Img(html5.Src("./me.jpg"), html5.Id("profile-photo")), html5.Text(html.EscapeString(userInput)), html5.Div(html5.Disabled(), html5.Data("coolness", "awesome"))(), ), ), ) hatmill.WriteDocument(os.Stdout, document) // Output:
<script>launchMissiles();</script>
}