front

package
v0.15.0-dev.23 Latest Latest
Warning

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

Go to latest
Published: Aug 19, 2026 License: Apache-2.0 Imports: 10 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func AttrsAppendCapture

func AttrsAppendCapture(attrs gox.Attrs, capture Capture, hook Hook)

func AttrsAppendEmitter added in v0.15.0

func AttrsAppendEmitter(attrs gox.Attrs, id uint64)

func AttrsAppendSetter added in v0.15.0

func AttrsAppendSetter(attrs gox.Attrs, id uint64)

func AttrsSetActive

func AttrsSetActive(attrs gox.Attrs, active []any)

func AttrsSetData

func AttrsSetData(attrs gox.Attrs, name string, data any)

func AttrsSetDoor

func AttrsSetDoor(attrs gox.Attrs, id uint64, container bool)

func AttrsSetHook

func AttrsSetHook(attrs gox.Attrs, name string, hook Hook)

func AttrsSetParent

func AttrsSetParent(attrs gox.Attrs, parent uint64)

func Include

func Include(inst core.Instance) gox.Elem

Types

type AutoID added in v0.15.0

type AutoID struct {
	// contains filtered or unexported fields
}

func (*AutoID) ID added in v0.15.0

func (s *AutoID) ID(inst core.Core) uint64

func (*AutoID) String added in v0.15.0

func (s *AutoID) String(inst core.Core) string

type Capture

type Capture interface {
	Name() string
	Listen() string
}

type ChangeCapture

type ChangeCapture struct {
}

func (ChangeCapture) Listen

func (c ChangeCapture) Listen() string

func (ChangeCapture) Name

func (c ChangeCapture) Name() string

type FocusCapture

type FocusCapture struct {
	Event string `json:"-"`
}

func (FocusCapture) Listen

func (c FocusCapture) Listen() string

func (FocusCapture) Name

func (c FocusCapture) Name() string

type FocusIOCapture

type FocusIOCapture struct {
	Event           string `json:"-"`
	StopPropagation bool   `json:"sp"`
	ExactTarget     bool   `json:"et"`
}

func (FocusIOCapture) Listen

func (c FocusIOCapture) Listen() string

func (FocusIOCapture) Name

func (c FocusIOCapture) Name() string

type FormCapture

type FormCapture struct {
}

func (FormCapture) Listen

func (c FormCapture) Listen() string

func (FormCapture) Name

func (c FormCapture) Name() string

type Hook

type Hook struct {
	Before   actions.Actions
	OnError  actions.Actions
	Scope    []Scope
	Indicate []Indicator
	Timeout  time.Duration
	core.Hook
}

func (Hook) MarshalJSON

func (h Hook) MarshalJSON() ([]byte, error)

type Indicator

type Indicator struct {
	// contains filtered or unexported fields
}

Indicator is a single temporary DOM change applied on the client.

func IndicatorAttr added in v0.12.1

func IndicatorAttr(s Selector, name string, value string) Indicator

func IndicatorClass added in v0.12.1

func IndicatorClass(s Selector, class string) Indicator

func IndicatorClassRemove added in v0.12.1

func IndicatorClassRemove(s Selector, class string) Indicator

func IndicatorContent added in v0.12.1

func IndicatorContent(s Selector, content string) Indicator

func (Indicator) MarshalJSON added in v0.12.1

func (i Indicator) MarshalJSON() ([]byte, error)

type InputCapture

type InputCapture struct {
	ExcludeValue bool `json:"ev"`
}

func (InputCapture) Listen

func (c InputCapture) Listen() string

func (InputCapture) Name

func (c InputCapture) Name() string

type KeyMatch added in v0.14.2

type KeyMatch struct {
	Key   string `json:"k"`
	Ctrl  uint8  `json:"c"`
	Shift uint8  `json:"s"`
	Alt   uint8  `json:"a"`
	Meta  uint8  `json:"m"`
}

KeyMatch is a single key + modifier constraint for a keyboard hook. The modifier fields carry Mod values: 0 any, 1 on, 2 off.

type KeyboardEventCapture

type KeyboardEventCapture struct {
	Event           string     `json:"-"`
	Keys            []KeyMatch `json:"ks,omitempty"`
	PreventDefault  bool       `json:"pd"`
	StopPropagation bool       `json:"sp"`
	ExactTarget     bool       `json:"et"`
}

func (KeyboardEventCapture) Listen

func (c KeyboardEventCapture) Listen() string

func (KeyboardEventCapture) Name

func (c KeyboardEventCapture) Name() string

type LinkCapture

type LinkCapture struct {
	StopPropagation bool `json:"sp"`
	HistoryReplace  bool `json:"hr"`
}

func (LinkCapture) Listen

func (c LinkCapture) Listen() string

func (LinkCapture) Name

func (c LinkCapture) Name() string

type PointerCapture

type PointerCapture struct {
	Event           string `json:"-"`
	PreventDefault  bool   `json:"pd"`
	StopPropagation bool   `json:"sp"`
	ExactTarget     bool   `json:"et"`
}

func (PointerCapture) Listen

func (pc PointerCapture) Listen() string

func (PointerCapture) Name

func (pc PointerCapture) Name() string

type Scope

type Scope struct {
	// Kind is the scheduling policy.
	Kind scopeKind
	// Id identifies the scope; requests that share it are scheduled together.
	Id string
	// Opt is the policy parameter, or nil when the policy takes none.
	Opt any
}

Scope is one client-side scheduling policy applied to a hook request.

func BlockingScope

func BlockingScope(id string) Scope

func ConcurrentScope

func ConcurrentScope(id string, groupId int) Scope

func DebounceScope

func DebounceScope(id string, duration time.Duration, limit time.Duration) Scope

func FrameScope

func FrameScope(id string, frame bool) Scope

func FreeScope

func FreeScope(id string) Scope

func LatestScope

func LatestScope(id string) Scope

func RateScope added in v0.12.31

func RateScope(id string, tick time.Duration) Scope

func SerialScope

func SerialScope(id string) Scope

func (Scope) MarshalJSON added in v0.12.1

func (s Scope) MarshalJSON() ([]byte, error)

type Scoper added in v0.12.1

type Scoper interface {
	Scopes() []Scope
}

type Selector

type Selector struct {
	// contains filtered or unexported fields
}

Selector picks the elements an indicator applies to.

func SelectQuery

func SelectQuery(query string) Selector

func SelectQueryAll

func SelectQueryAll(query string) Selector

func SelectQueryParent

func SelectQueryParent(query string) Selector

func SelectTarget

func SelectTarget() Selector

func (Selector) MarshalJSON

func (s Selector) MarshalJSON() ([]byte, error)

type SelectorMode

type SelectorMode string
const (
	SelectModeTarget      SelectorMode = "target"
	SelectModeQuery       SelectorMode = "query"
	SelectModeQueryAll    SelectorMode = "query_all"
	SelectModeParentQuery SelectorMode = "parent_query"
)

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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