h

package module
v0.0.0-...-64d01df Latest Latest
Warning

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

Go to latest
Published: May 1, 2016 License: MIT Imports: 5 Imported by: 0

README

gohyperscript Build Status

Creates virtual dom trees.

HTMLToH

http://bigdrum.github.io/gohyperscript

TODO

  • Escape attributes.
  • Validate tag, attribute key.
  • Tune performance.
  • Context aware escape.

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ToString

func ToString(n N) (string, error)

func URL

func URL(path string, params Params) string

Types

type Attrs

type Attrs []KV

func (Attrs) ICanBeToken

func (a Attrs) ICanBeToken()

type DangerousUnescaped

type DangerousUnescaped string

func (DangerousUnescaped) ICanBeToken

func (s DangerousUnescaped) ICanBeToken()

func (DangerousUnescaped) ToHTML

type KV

type KV struct {
	K string
	V string
}

func Attr

func Attr(k, v string) KV

func (KV) ICanBeToken

func (a KV) ICanBeToken()

type List

type List []N

func L

func L(nlist ...N) List

func (*List) Add

func (ns *List) Add(n N)

func (List) ICanBeToken

func (ns List) ICanBeToken()

func (List) ToHTML

func (ns List) ToHTML(w StringWriter) error

type N

type N interface {
	Token
	ToHTML(w StringWriter) error
}

func H

func H(tag string, nodes ...interface{}) N

func Javascript

func Javascript(js string) N

func MetaNameContent

func MetaNameContent(name, content string) N

func ScopedStyle

func ScopedStyle(style string) N

type Params

type Params []KV

type S

type S string

func (S) ICanBeToken

func (s S) ICanBeToken()

func (S) String

func (s S) String() string

func (S) ToHTML

func (s S) ToHTML(w StringWriter) error

type StringWriter

type StringWriter interface {
	WriteString(s string) (int, error)
}

type Token

type Token interface {
	ICanBeToken()
}

func ClassName

func ClassName(className string, enabled bool) Token

func Href

func Href(href string) Token

func Src

func Src(src string) Token

func Style

func Style(style string) Token

func TargetBlank

func TargetBlank() Token

Directories

Path Synopsis
js

Jump to

Keyboard shortcuts

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