js

package
v1.0.4 Latest Latest
Warning

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

Go to latest
Published: Mar 12, 2024 License: GPL-3.0 Imports: 1 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func AddEventListener

func AddEventListener(inputEvent string, inputFunc func(Value, []Value))

Types

type Body

type Body struct {
	Style StyleBody
}

func (*Body) AppendCanvasChild

func (b *Body) AppendCanvasChild(inputCanvas *Canvas)

func (*Body) AppendChild

func (b *Body) AppendChild(inputElement *Element)

type Canvas

type Canvas struct {
	JSCanvas Value
}

func CreateCanvasElement

func CreateCanvasElement() *Canvas

func GetElementById

func GetElementById(inputID string) *Canvas

type Context

type Context struct {
	JSContext Value
}

type Document

type Document struct {
	Body            *Body
	DocumentElement *DocumentElement
}

type DocumentElement

type DocumentElement struct {
	Style StyleDocument
}

func (*DocumentElement) ClientHeight

func (d *DocumentElement) ClientHeight() int

func (*DocumentElement) ClientWidth

func (d *DocumentElement) ClientWidth() int

type Element

type Element struct {
	JSElement js.Value
	Style     js.Value
}

func CreateElement

func CreateElement(newElement string) *Element

func (*Element) AddEventListener

func (e *Element) AddEventListener(inputEvent string, inputFunc func(Value, []Value))

func (*Element) Set

func (e *Element) Set(keyValue string, inputValue any)

type StyleBody

type StyleBody struct{}

func (*StyleBody) Set

func (b *StyleBody) Set(inputKey string, inputValue any)

type StyleDocument

type StyleDocument struct{}

func (*StyleDocument) Set

func (d *StyleDocument) Set(inputKey string, inputValue any)

type Value

type Value js.Value

Jump to

Keyboard shortcuts

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