dom

package
v0.0.0-...-f2091f6 Latest Latest
Warning

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

Go to latest
Published: Oct 17, 2015 License: BSD-2-Clause Imports: 1 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	NewEventHandler func(EventHandler) interface{}
)

Functions

func SetDocument

func SetDocument(doc Document)

func SetDomDriver

func SetDomDriver(drv Driver)

Types

type Document

type Document interface {
	Title() string
	SetTitle(title string)

	Node
}

func GetDocument

func GetDocument() Document

type Driver

type Driver interface {
	CreateNode(interface{}) Node
}

type Event

type Event interface {
	PreventDefault()
	StopPropagation()
	JS() *js.Object
}

type EventHandler

type EventHandler func(Event)

type FormEl

type FormEl interface {
	Node
	IsValid() bool
}

type InputEl

type InputEl interface {
	Node
	Value() string
	SetValue(string)
	Checked() bool
	SetChecked(bool)
}

type Node

type Node interface {
	Type() NodeType
	Find(query string) []Node
	Data() string
	Children() []Node

	SetAttr(string, interface{})
	SetProp(string, interface{})
	RemoveAttr(string)

	Clear()
	JS() *js.Object
	SetClass(string, bool)
}

func CreateNode

func CreateNode(native interface{}) Node

type NodeType

type NodeType int
const (
	NopNode NodeType = iota
	ElementNode
	TextNode
)

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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