partial

package
v0.2.8 Latest Latest
Warning

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

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

Documentation

Index

Constants

View Source
const ImportPath = "github.com/cssbruno/gowdk/addons/partial"

ImportPath is the canonical Go import path for the partial addon.

Variables

This section is empty.

Functions

func Addon

func Addon() gowdk.Addon

Addon enables server fragments and partial swaps.

func Fragment

func Fragment(target, html string) response.Response

Fragment returns a server fragment response for a DOM target.

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 (
	SwapReplace SwapMode = "replace"
	SwapAppend  SwapMode = "append"
	SwapPrepend SwapMode = "prepend"
	SwapBefore  SwapMode = "before"
	SwapAfter   SwapMode = "after"
)

Jump to

Keyboard shortcuts

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