vendorjs

package
v1.5.0-beta.2 Latest Latest
Warning

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

Go to latest
Published: Jul 20, 2026 License: MIT Imports: 3 Imported by: 0

Documentation

Overview

Package vendorjs owns the third-party client scripts Gothic used to load from a public CDN (unpkg): HTMX. It is embedded here and served from the framework's own /_gothic/ route (via runtimeassets) instead of a render-blocking cross-origin <script>, so the browser never pays a third-party DNS/TLS/connection cost on the critical path and the script inherits the framework's immutable cache + on-the-wire compression.

Each asset exposes a content hash (Version) used as the ?v= cache-buster in the URL the layout references, matching the convention used by gothiccore/corewasm. Bumping the pinned upstream file (recopying the min.js) changes the bytes → changes the hash → busts the browser cache automatically.

It is a LEAF package (no internal deps) so both the runtime-asset registry and the components layer can import it without forming a cycle.

Index

Constants

View Source
const (
	HtmxFileName = "htmx.min.js"
)

Emitted basename served under /_gothic/.

Variables

This section is empty.

Functions

func HtmxJS

func HtmxJS() []byte

HtmxJS returns the embedded HTMX bytes. Served from /_gothic/.

func HtmxVersion

func HtmxVersion() string

HtmxVersion returns HTMX's content hash — the ?v= cache-buster the layout uses.

Types

This section is empty.

Jump to

Keyboard shortcuts

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