partial

package
v0.8.0 Latest Latest
Warning

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

Go to latest
Published: Jun 22, 2026 License: MPL-2.0 Imports: 1 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Fragment

func Fragment(target, html string) response.Response

Fragment returns a server fragment response for a DOM target.

func Swap

func Swap(target string, mode SwapMode, html string) (response.Response, error)

Swap returns a server fragment response with an explicit client swap mode.

Types

type ClientHook

type ClientHook string

ClientHook names lifecycle hooks emitted for the partial update client runtime.

const (
	HookBeforeRequest ClientHook = "before-request"
	HookAfterSwap     ClientHook = "after-swap"
	HookRequestError  ClientHook = "request-error"
)

type SwapMode

type SwapMode string

SwapMode describes how a server fragment should be applied by the client runtime.

const (
	SwapInnerHTML SwapMode = "innerHTML"
	SwapOuterHTML SwapMode = "outerHTML"
)

Jump to

Keyboard shortcuts

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