vdomclient

package
v0.9.0-beta.0 Latest Latest
Warning

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

Go to latest
Published: Oct 26, 2024 License: Apache-2.0 Imports: 12 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Client

type Client struct {
	Lock               *sync.Mutex
	Root               *vdom.RootElem
	RootElem           *vdom.VDomElem
	RpcClient          *wshutil.WshRpc
	RpcContext         *wshrpc.RpcContext
	ServerImpl         *VDomServerImpl
	IsDone             bool
	RouteId            string
	VDomContextBlockId string
	DoneReason         string
	DoneCh             chan struct{}
	Opts               vdom.VDomBackendOpts
	GlobalEventHandler func(client *Client, event vdom.VDomEvent)
}

func MakeClient

func MakeClient(opts *vdom.VDomBackendOpts) (*Client, error)

func (*Client) CreateVDomContext

func (c *Client) CreateVDomContext(target *vdom.VDomTarget) error

func (*Client) GetAtomVal

func (c *Client) GetAtomVal(name string) any

func (*Client) GetIsDone

func (c *Client) GetIsDone() bool

func (*Client) RegisterComponent

func (c *Client) RegisterComponent(name string, cfunc vdom.CFunc)

func (*Client) SendAsyncInitiation

func (c *Client) SendAsyncInitiation() error

func (*Client) SetAtomVal

func (c *Client) SetAtomVal(name string, val any)

func (*Client) SetAtomVals

func (c *Client) SetAtomVals(m map[string]any)

func (*Client) SetGlobalEventHandler

func (c *Client) SetGlobalEventHandler(handler func(client *Client, event vdom.VDomEvent))

func (*Client) SetRootElem

func (c *Client) SetRootElem(elem *vdom.VDomElem)

type VDomServerImpl

type VDomServerImpl struct {
	Client  *Client
	BlockId string
}

func (*VDomServerImpl) VDomRenderCommand

func (impl *VDomServerImpl) VDomRenderCommand(ctx context.Context, feUpdate vdom.VDomFrontendUpdate) (*vdom.VDomBackendUpdate, error)

func (*VDomServerImpl) WshServerImpl

func (*VDomServerImpl) WshServerImpl()

Jump to

Keyboard shortcuts

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