domrender

package
v0.3.5 Latest Latest
Warning

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

Go to latest
Published: Dec 3, 2022 License: MIT Imports: 11 Imported by: 6

Documentation

Overview

Package domrender has the rendering engine that takes virtual DOM from components and synchronizes it with the browser's DOM.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type JSRenderer

type JSRenderer struct {
	MountPointSelector string
	// contains filtered or unexported fields
}

JSRenderer implements Renderer against the browser's DOM.

func New

func New(mountPointSelector string) (*JSRenderer, error)

New will create a new JSRenderer with the speicifc mount point selector. If an empty string is passed then the root component should include a top level <html> tag and the entire page will be rendered.

func NewJSRenderer deprecated

func NewJSRenderer(mountPointSelector string) (*JSRenderer, error)

NewJSRenderer is an alias for New.

Deprecated: Use New instead.

func (*JSRenderer) EventEnv

func (r *JSRenderer) EventEnv() vugu.EventEnv

EventEnv returns an EventEnv that can be used for synchronizing updates.

func (*JSRenderer) EventWait

func (r *JSRenderer) EventWait() (ok bool)

EventWait blocks until an event has occurred which causes a re-render. It returns true if the render loop should continue or false if it should exit.

func (*JSRenderer) Release

func (r *JSRenderer) Release()

Release calls release on any resources that this renderer allocated.

func (*JSRenderer) Render

func (r *JSRenderer) Render(buildResults *vugu.BuildResults) error

Render is a render function.

Jump to

Keyboard shortcuts

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