D3vugu-components/components/navigation/button-fullscreen.go

17 lines
302 B
Go

package navigation
import (
"github.com/vugu/vugu"
"github.com/vugu/vugu/js"
)
type ButtonFullscreen struct {
AttrMap vugu.AttrMap
}
func (c *ButtonFullscreen) handleClick(event vugu.DOMEvent) {
docElem := js.Global().Get("document").Get("documentElement")
docElem.Call("requestFullscreen")
}