m3e/link

Types

Link defines all the attributes of an HTML link

Fields:

  • download: Specifies that the target will be downloaded when a user clicks on the hyperlink
  • href: Specifies the URL of the page the link goes to
  • rel: Specifies the relationship between the current document and the linked document
  • target: Specifies the target for where to open the linked document or where to submit the form
pub type Link {
  Link(download: Bool, href: String, rel: String, target: Target)
}

Constructors

  • Link(download: Bool, href: String, rel: String, target: Target)

Target specifies where to open a linked document or display a form response

pub type Target {
  Blank
  Parent
  Self
  Top
}

Constructors

  • Blank
  • Parent
  • Self
  • Top

Values

pub fn attributes(
  l: option.Option(Link),
) -> List(attribute.Attribute(msg))

attributes creates Lustre Attributes for a Link

pub fn download(link: Link, download: Bool) -> Link

download updates the download attribute of a Link

pub fn href(link: Link, href: String) -> Link

href updates the href attribute of a Link

pub fn link_target_to_string(t: Target) -> String
pub fn new(href: String) -> Link

new creates a new Link

pub fn rel(link: Link, rel: String) -> Link

rel updates the rel attribute of a Link

pub fn target(link: Link, target: Target) -> Link

target updates the target attribute of a Link

Search Document