seed: github.com/qlova/seed/html Index | Files

package html

import "github.com/qlova/seed/html"

Index

Package Files

const.go html.go

type Attribute Uses

type Attribute string

Attribute is an HTML element attribute.

const (
    Source          Attribute = "src"
    Value           Attribute = "value"
    AllowFullscreen Attribute = "allowfullscreen"
    Frameborder     Attribute = "frameborder"

    Download                   Attribute = "download"
    HypertextReference         Attribute = "href"
    HypertextReferenceLanguage Attribute = "hreflang"
    Relationship               Attribute = "rel"
    Target                     Attribute = "target"
    Type                       Attribute = "type"
    Ping                       Attribute = "ping"
)

Collection of attributes.

type Element Uses

type Element struct {
    Tag
    Attributes map[Attribute]string

    HTML []byte
}

Element is an HTML element.

func (*Element) Set Uses

func (element *Element) Set(attribute Attribute, value ...string)

Set the attribute of an HTML element.

func (*Element) SetHTML Uses

func (element *Element) SetHTML(html string)

SetHTML from a string. Shorthand for element.HTML = []byte(html)

type Language Uses

type Language string

Language is a valid language attribute.

type LinkType Uses

type LinkType string

LinkType indicate the relationship between two documents. See https://developer.mozilla.org/en-US/docs/Web/HTML/Link_types

type Tag Uses

type Tag string

Tag is an HTML tag.

const (
    HTML    Tag = "html"
    Divider     = "div"
)

Collection of HTML tags.

type TargetType Uses

type TargetType string

TargetType is a valid hypertext-reference target type.

const (
    Self   TargetType = "_self"
    Blank  TargetType = "_blank"
    Parent TargetType = "_parent"
    Top    TargetType = "_top"
)

TargetTypes

Package html is imported by 2 packages. Updated 2020-01-10. Refresh now. Tools for package owners.