renderer

package
v0.3.0 Latest Latest
Warning

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

Go to latest
Published: Sep 26, 2025 License: MIT Imports: 4 Imported by: 0

Documentation

Rendered for js/wasm

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Renderer

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

func NewRenderer

func NewRenderer(containerID string) *Renderer

func (*Renderer) GetContainer

func (r *Renderer) GetContainer() js.Value

GetContainer returns the container element

func (*Renderer) Patch

func (r *Renderer) Patch(parent js.Value, currentVNode *vdom.VNode, newVNode *vdom.VNode)

Patch the DOM from old to new This is the main algorithm for the virtual DOM diffing Here remain most of the efficiciency for the virtual DOM TODO: Implement a better algorithm for keyed lists

func (*Renderer) Render

func (r *Renderer) Render(newVNode *vdom.VNode)

func (*Renderer) RequestFrame

func (r *Renderer) RequestFrame()

RequestFrame requests an animation frame for smooth rendering

Jump to

Keyboard shortcuts

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