Skip to content

Commit

Permalink
fix web
Browse files Browse the repository at this point in the history
  • Loading branch information
maxence-charriere committed Dec 12, 2018
1 parent 5948e68 commit 5043a97
Show file tree
Hide file tree
Showing 4 changed files with 16 additions and 2 deletions.
1 change: 1 addition & 0 deletions drivers/web/page.go
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,7 @@ func newPage(c app.PageConfig) app.Page {
Factory: driver.factory,
Resources: driver.Resources,
AttrTransforms: []dom.Transform{dom.JsToGoHandler},
CallOnUI: driver.CallOnUIGoroutine,
},
}

Expand Down
2 changes: 1 addition & 1 deletion examples/demo/main_js.go
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,6 @@ func main() {
)

app.Run(&web.Driver{
URL: "/Hello",
URL: "window",
})
}
5 changes: 5 additions & 0 deletions examples/demo/resources/css/main.css
Original file line number Diff line number Diff line change
Expand Up @@ -72,4 +72,9 @@ td {

tr:last-child td {
border-bottom: 0;
}

.NotSupported {
font-style: italic;
color: #e93937;
}
10 changes: 9 additions & 1 deletion examples/demo/window.go
Original file line number Diff line number Diff line change
Expand Up @@ -201,9 +201,17 @@ func (w *Window) Render() string {
<div class="Window-Action-List">
{{range $idx, $v := .Actions}}
<div class="Window-Action" onclick="{{to "Actions" $idx "Action"}}">
<h2>{{.Name}}</h2>
<h2>
{{.Name}}
{{if .NotSupported}}
<span class="NotSupported">- Not supported</span>
{{end}}
</h2>
<p>{{.Description}}</p>
</div>
{{else}}
<h2 class="NotSupported">Not supported</h2>
{{end}}
</div>
</div>
Expand Down

0 comments on commit 5043a97

Please sign in to comment.