partial

package
v0.3.0 Latest Latest
Warning

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

Go to latest
Published: Jun 12, 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.

func Swap added in v0.3.0

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