Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func SupportedDirectiveNames ¶
func SupportedDirectiveNames() []string
SupportedDirectiveNames returns the sorted closed set of exact-name g: directives owned by the current view contract (excluding the g:on:* event family and the g:message:* rules, which are validated separately). It is the source of truth cross-checked against docs/language/stability.md.
Types ¶
type ComponentCall ¶
type ComponentCall = viewmodel.ComponentCall
type EventDirective ¶
type EventDirective struct {
Event string
Prevent bool
Stop bool
Once bool
Capture bool
DebounceMS int
ThrottleMS int
}
EventDirective is a parsed g:on:<event>[.<modifier>] directive.
func ParseEventDirective ¶
func ParseEventDirective(name string) (EventDirective, error)
ParseEventDirective validates and splits a g:on directive name.
func (EventDirective) RuntimeOptions ¶
func (directive EventDirective) RuntimeOptions() string
RuntimeOptions returns the compact modifier string emitted into HTML.
type ForDirective ¶
ForDirective is a parsed g:for declaration.
func ParseForDirective ¶
func ParseForDirective(source string) (ForDirective, error)
ParseForDirective parses a g:for value such as "item in Items" or "item, i in Items".
Click to show internal directories.
Click to hide internal directories.