Documentation
¶
Overview ¶
package browserpage owns tnl's standalone browser presentation. it depends only on bundled fonts and the standard library; callers retain routing, authentication, status codes, and page-specific security policy.
Index ¶
- Constants
- func AcceptsHTML(accept string) bool
- func Error(w http.ResponseWriter, r *http.Request, message string, status int)
- func FaviconLink() string
- func Headers(w http.ResponseWriter)
- func MessageHTML(message Message) string
- func Redirect(w http.ResponseWriter, location string)
- func WriteMessage(w http.ResponseWriter, status int, message Message)
- type Message
- type Page
- type Template
Constants ¶
const ContentSecurityPolicy = pageSecurityPolicy + "; form-action 'none'"
const FormSecurityPolicy = pageSecurityPolicy + "; form-action 'self'"
Variables ¶
This section is empty.
Functions ¶
func AcceptsHTML ¶
AcceptsHTML requires an explicit html preference; api clients and callers accepting only */* keep their original machine-readable response.
func FaviconLink ¶
func FaviconLink() string
FaviconLink returns fixed markup for pages that allow data: images.
func Headers ¶
func Headers(w http.ResponseWriter)
func MessageHTML ¶
keep the portable message and handoff pages on fixed markup. html/template looks up methods by name at runtime, which made the linker keep unused control client methods in the wasm build.
func Redirect ¶
func Redirect(w http.ResponseWriter, location string)
func WriteMessage ¶
func WriteMessage(w http.ResponseWriter, status int, message Message)