metas

package
Version: v0.0.0-...-15212fd Latest Latest
Warning

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

Go to latest
Published: May 17, 2020 License: MIT Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Buildable

type Buildable interface {
	Build() *js.Object
}

Buildable is an interface which is used internally to ensure that item is buildable. Used mostly for child items.

type Generic

type Generic struct {
	Buildable
	InnerItems
	Object *js.Object
}

Generic is a structure embedded into other structures and provides some generic things like working with classes, IDs and others. Also this is the struct that holds real object.

func (*Generic) AddClassesFromString

func (g *Generic) AddClassesFromString(classes string)

AddClassesFromString adds classes to object from string. Classes should be specified like "class1 class2 ... classN".

func (*Generic) InitializeGeneric

func (g *Generic) InitializeGeneric()

InitializeGeneric initializes itself and all embedded things. This function SHOULD NOT be called manually by end-user, it should be called only for elements.

func (*Generic) SetHandler

func (g *Generic) SetHandler(event string, handler func(e *js.Object))

SetHandler sets handler function for specific event.

func (*Generic) SetTextContent

func (g *Generic) SetTextContent(text string)

SetTextContent sets text content for passed object. Note that not all HTML elements able to display it.

type InnerItems

type InnerItems struct {
	// contains filtered or unexported fields
}

InnerItems is a meta structure that should be embedded in all other structures (notably element controlling ones). It provide ability to add child elements.

func (*InnerItems) AddChild

func (it *InnerItems) AddChild(object Buildable)

AddChild adds child to element.

func (*InnerItems) BuildChilds

func (it *InnerItems) BuildChilds(parent *js.Object)

BuildChilds build child elements and adds them to parent.

func (*InnerItems) InnerItemsCount

func (it *InnerItems) InnerItemsCount() int

InnerItemsCount returns child items count.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
t or T : Toggle theme light dark auto
y or Y : Canonical URL