Documentation ¶
Index ¶
- type Application
- type Bridge
- type Container
- type ContainerButton
- type ContainerDiv
- type ContainerHTML
- type ContainerScript
- type ContainerSpan
- type ContainerTitle
- type Element
- func (e *Element[T]) GetAttribute(key string) string
- func (e *Element[T]) ID(id string) T
- func (e *Element[T]) Marshal() string
- func (e *Element[T]) MarshalIndent(prefix string) string
- func (e *Element[T]) OnClick(a *Application, fn func()) T
- func (e *Element[T]) SetAttribute(key string, value string) T
- type IElement
- type NodeText
- type Promise
- type Window
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Application ¶
type Application struct { WebsocketRoutePath string // contains filtered or unexported fields }
func NewApplication ¶
func NewApplication(wsRoutePath string) *Application
func (*Application) CallJS ¶
func (a *Application) CallJS(eval string, callback func(any))
func (*Application) NewWindow ¶
func (a *Application) NewWindow() *Window
func (*Application) WebsocketHandler ¶
func (a *Application) WebsocketHandler(w http.ResponseWriter, r *http.Request)
func (*Application) WsScriptHandler ¶
func (a *Application) WsScriptHandler(w http.ResponseWriter, r *http.Request)
type Container ¶
func (*Container[T]) MarshalIndent ¶
type ContainerButton ¶
type ContainerButton struct { *Container[*ContainerButton] }
func Button ¶
func Button(texts ...string) *ContainerButton
type ContainerDiv ¶
type ContainerDiv struct { *Container[*ContainerDiv] }
func Div ¶
func Div(children ...IElement) *ContainerDiv
func DivAttr ¶
func DivAttr() *ContainerDiv
type ContainerHTML ¶
type ContainerHTML struct {
// contains filtered or unexported fields
}
func HTML ¶
func HTML() *ContainerHTML
func (*ContainerHTML) Body ¶
func (c *ContainerHTML) Body(children ...IElement) *ContainerHTML
func (*ContainerHTML) Head ¶
func (c *ContainerHTML) Head(children ...IElement) *ContainerHTML
func (*ContainerHTML) Marshal ¶
func (e *ContainerHTML) Marshal() string
func (*ContainerHTML) MarshalIndent ¶
func (e *ContainerHTML) MarshalIndent(prefix string) string
type ContainerScript ¶
type ContainerScript struct { *Container[*ContainerScript] }
func Script ¶
func Script(jsCode string) *ContainerScript
func ScriptSrc ¶
func ScriptSrc(src string) *ContainerScript
type ContainerSpan ¶
type ContainerSpan struct { *Container[*ContainerSpan] }
func Span ¶
func Span(texts ...string) *ContainerSpan
type ContainerTitle ¶
type Element ¶
func (*Element[T]) GetAttribute ¶
func (*Element[T]) MarshalIndent ¶
func (*Element[T]) OnClick ¶
func (e *Element[T]) OnClick(a *Application, fn func()) T
func (*Element[T]) SetAttribute ¶
Click to show internal directories.
Click to hide internal directories.