target

package
v0.3.0-rc1 Latest Latest
Warning

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

Go to latest
Published: Apr 7, 2026 License: MIT Imports: 0 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	// Self Opens in the same frame/window (default behavior). Content loads in the current browsing context
	// without creating new windows or tabs.
	Self = Target("_self")

	// Blank Opens in a new window or tab. Always use with rel='noopener noreferrer' for security when
	// linking to external sites to prevent potential security vulnerabilities.
	Blank = Target("_blank")

	// Parent Opens in the parent frame. If no parent frame exists, behaves exactly like _self and loads
	// in the current context.
	Parent = Target("_parent")

	// Top Opens in the top-level frame, breaking out of all nested frames. Loads content in the
	// top-most browsing context.
	Top = Target("_top")
)

Variables for Target values

Functions

This section is empty.

Types

type Target

type Target []byte

Target Browsing context for displaying linked resources or form responses. Controls where content opens when links are activated or forms are submitted.

func Custom

func Custom(value string) Target

Custom allows setting a custom Target value for edge cases or future specifications. Use this when the predefined constants don't cover your specific use case.

Jump to

Keyboard shortcuts

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