engine

package module
v0.0.0-...-f74c09b Latest Latest
Warning

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

Go to latest
Published: Dec 24, 2018 License: MIT Imports: 1 Imported by: 0

README

Build Status Go Report Card GoDoc

engine

Engine is just some basic dom manipulation stuff. Which I developed for my usage in wasm and go applications.

Just run:

go get -u GOOS=js GOARCH=wasm go app.goget -u github.com/rajnikant12345/engine

and you can use it, in your go programs for dom manipulation.

Documentation

Rendered for js/wasm

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func CreateApp

func CreateApp()

CreateApp is called by the main function to start your wasm app.

func InitApp

func InitApp()

InitApp is sane as CreateApp but I have kept it here for future use.

func StartApp

func StartApp()

StartApp is clled by main app to start the applicatio and e.g. engine.CreateApp()

engine.App.AddChild( app.CreateApp() )
engine.StartApp()

Types

type Element

type Element struct {
	Node js.Value
	// contains filtered or unexported fields
}
var App *Element

func NewElement

func NewElement(tag string) *Element

func (*Element) AddChild

func (e *Element) AddChild(element *Element) *Element

func (*Element) AppendClass

func (e *Element) AppendClass(class string) *Element

func (*Element) Nest

func (e *Element) Nest(el ...*Element) *Element

func (*Element) RemoveChild

func (e *Element) RemoveChild() *Element

func (*Element) RemoveSingleChild

func (e *Element) RemoveSingleChild(element *Element) *Element

func (*Element) Set

func (e *Element) Set(key string, value string) *Element

func (*Element) SetCallBack

func (e *Element) SetCallBack(cbType string, cb js.Callback) *Element

func (*Element) SetClass

func (e *Element) SetClass(class string) *Element

func (*Element) SetId

func (e *Element) SetId(id string) *Element

func (*Element) SetInnerHtml

func (e *Element) SetInnerHtml(innerhtml string) *Element

func (*Element) SetStyle

func (e *Element) SetStyle(key string, value string) *Element

Jump to

Keyboard shortcuts

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