htmlparsing

package
v1.0.0 Latest Latest
Warning

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

Go to latest
Published: Dec 20, 2021 License: Apache-2.0 Imports: 4 Imported by: 0

Documentation

Index

Constants

View Source
const (
	AsyncCSSClassname = "n-hopin-u-async-css"
)

Variables

This section is empty.

Functions

func AsyncCSSTag

func AsyncCSSTag(cms []CSSMediaPair) *html.Node

func AsyncJSTag

func AsyncJSTag(url string) *html.Node

func Attributes

func Attributes(e *html.Node) map[string]html.Attribute

func FindNodeByTag

func FindNodeByTag(tag string, node *html.Node) *html.Node

func FindNodesByClassname

func FindNodesByClassname(classname string, node *html.Node) []*html.Node

func FindNodesByTag

func FindNodesByTag(tag string, node *html.Node) []*html.Node

func GetKeys

func GetKeys(node *html.Node) sets.StringSet

func InlineCSSTag

func InlineCSSTag(contents string) *html.Node

func InlineJSTag

func InlineJSTag(contents string) *html.Node

func PreloadTag

func PreloadTag(as, url string) *html.Node

func SwapNodes

func SwapNodes(original, new *html.Node)

func SyncCSSTag

func SyncCSSTag(cm CSSMediaPair) *html.Node

func SyncJSTag

func SyncJSTag(url string) *html.Node

Types

type CSSMediaPair

type CSSMediaPair struct {
	URL   string
	Media string
}

Jump to

Keyboard shortcuts

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