func mainPage() { js.GetDocument().SetTitle("Main Page") js.GetDocument().GetBody().SetInnerHTML(html.Div().Children( html.H1().Id(h1Id).Text("Click Me"), html.A().Href(paths.second).Text("Second page"), )) navUsingH1(paths.second) }
func secondPage() { js.GetDocument().SetTitle("Second Page") js.GetDocument().GetBody().SetInnerHTML( html.Div().Children( html.H1().Id(h1Id).Text("I am second page"), html.A().Href(paths.main).Text("First page"), ), ) navUsingH1(paths.main) }
func mainPage(document dom.Document) { js.SetTitle("Main Page") js.SetBody(html.Div().Children( html.H1().Id(h1Id).Text("Click Me"), html.A().Href(paths.second).Text("Second page"), )) h1 := document.QuerySelector(h1Id.Selector()) h1.AddEventListener("click", true, func(event dom.Event) { js.NavigateTo(paths.second) }) }
func mainPage(document dom.Document) { js.SetTitle("Main Page") js.SetBody(html.Div().Children( html.H1().Text("Hello world"), )) }
func pageNotFound() { GetDocument().SetTitle("Page Not Found") GetDocument().GetBody().SetInnerHTML( html.H1().Text("ERROR Page not found"), ) }
func mainPage() { js.GetDocument().SetTitle("Main Page") js.GetDocument().GetBody().SetInnerHTML(html.Div().Children( html.H1().Text("Hello world"), )) }
func helloWorldHandler(document *nadeshiko.Document) { document.JQuery(css.Body).HTML(html.H1().Text("Hello World !!!")) }
func pageNotFound(document dom.Document) { SetTitle("Page Not Found") SetBody( html.H1().Text("ERROR Page not found"), ) }