base

package
v0.2.9 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Apr 18, 2022 License: MIT Imports: 7 Imported by: 3

Documentation

Index

Constants

View Source
const AddEventListener = "addEventListener"

Variables

This section is empty.

Functions

func HTMLButtonUpdate

func HTMLButtonUpdate(buttons []app.HTMLButton, modify func(button app.HTMLButton)) (result []app.UI)

HTMLButtonUpdate is a convenience method for applying additional operations on buttons that are used in nav bars or other locations.

func OnEvent

func OnEvent(msg string) func(ctx app.Context, e app.Event)

OnEvent logs a message when the event fires.

Types

type ComponentTest

type ComponentTest struct {
	T          *testing.T
	Compo      app.UI
	Dispatcher app.ServerDispatcher
	// contains filtered or unexported fields
}

func (*ComponentTest) At

func (c *ComponentTest) At(path ...int) Match

func (*ComponentTest) Close

func (c *ComponentTest) Close()

func (*ComponentTest) Match

func (c *ComponentTest) Match(expected app.UI)

type Counter

type Counter struct {
	app.Compo
	Label string
	Count int
}

func (*Counter) Render

func (c *Counter) Render() app.UI

type JsUtil

type JsUtil struct{}

func (*JsUtil) ConsoleLog

func (j *JsUtil) ConsoleLog(args ...interface{})

func (*JsUtil) JsNewAtPath

func (j *JsUtil) JsNewAtPath(path string, args ...interface{}) app.Value

func (*JsUtil) JsValueAt

func (j *JsUtil) JsValueAt(root app.Value, path string, warn bool) app.Value

func (*JsUtil) JsValueAtPath

func (j *JsUtil) JsValueAtPath(path string) app.Value

func (*JsUtil) LogWithP

func (j *JsUtil) LogWithP(o interface{}, msg string)

func (*JsUtil) MDCRipple

func (j *JsUtil) MDCRipple(id string) app.Value

MDCRipple constructs a new mdc.ripple.MDCRipple from a provided element id

func (*JsUtil) MDCRippleVal

func (j *JsUtil) MDCRippleVal(val app.Value) app.Value

MDCRippleVal constructs a new mdc.ripple.MDCRipple from a provided app.Value

func (*JsUtil) UUID

func (j *JsUtil) UUID() string

UUID generates a new uuid string for testing and demo purposes

type Match

type Match interface {
	Match(expected app.UI)
}

type Message added in v0.2.3

type Message struct {
	app.Compo
	Text string
}

func (*Message) Render added in v0.2.3

func (c *Message) Render() app.UI

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL