dom

package
v0.0.0-...-1cd5fee Latest Latest
Warning

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

Go to latest
Published: Nov 22, 2019 License: MIT Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Call

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

Call the dom and sends a message back to the application

func NewCall

func NewCall(ref Ref, m sv.Msg, name string, args ...interface{}) *Call

func (*Call) Execute

func (cmd *Call) Execute(executer sv.CmpU, pf sv.Platform, p sv.Publisher) error

type Class

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

Class is a reference that can be used more than once

func NewClass

func NewClass() Class

func (Class) Identify

func (r Class) Identify() bool

func (Class) String

func (r Class) String() string

type ID

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

ID is a reference that is expected to be used at-most once

func NewID

func NewID() ID

func (ID) Identify

func (r ID) Identify() bool

func (ID) String

func (r ID) String() string

type Listener

type Listener struct {
	sv.Sub
	// contains filtered or unexported fields
}

Listener is a subscription that allows the component to be sent messages whenever an event was triggered on objects identified by the refs during the capture phase.

func NewListener

func NewListener(typ string, ref Ref, m sv.Msg) (l *Listener)

NewListener will create a new event listener subscription

func (*Listener) Emit

func (s *Listener) Emit(ev p.Value)

func (*Listener) Start

func (s *Listener) Start(subscriber sv.CmpU, pf sv.Platform, p sv.Publisher) (err error)

func (*Listener) Stop

func (s *Listener) Stop(subscriber sv.CmpU, pf sv.Platform, _ sv.Publisher) (err error)
type Navigate struct {
	// contains filtered or unexported fields
}

Navigate is the command that allows components to navigate the user

func NewNavigate

func NewNavigate(p string) *Navigate
func (cmd *Navigate) Execute(executer sv.CmpU, pf sv.Platform, p sv.Publisher) (err error)

Execute the Navigate

type PreventDefault

type PreventDefault struct{}

PreventDefault can be embedded into message to signal to the platform that the default action of an event should not be executed

func (PreventDefault) DoPreventDefault

func (pd PreventDefault) DoPreventDefault() bool

type PreventDefaulter

type PreventDefaulter interface {
	DoPreventDefault() bool
}

type Read

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

Read reads the dom and sends a message back to the application

func NewRead

func NewRead(ref Ref, m sv.Msg) *Read

func (*Read) Execute

func (cmd *Read) Execute(executer sv.CmpU, pf sv.Platform, p sv.Publisher) error

type Ref

type Ref interface {
	String() string
	Identify() bool
}

Ref provides operation on view elements. If the indicates that is an identity reference the platform can assume there is only element with this reference to speed up the search.

type StopPropagation

type StopPropagation struct{}

StopPropagation can be embedded into a message to signal to the platform that the source event should not bubble further

func (StopPropagation) DoStopPropagation

func (sp StopPropagation) DoStopPropagation() bool

type StopPropagationer

type StopPropagationer interface {
	DoStopPropagation() bool
}

Source Files

  • call.go
  • dom.go
  • listener.go
  • nav.go
  • read.go
  • ref.go

Jump to

Keyboard shortcuts

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