dom

package
v0.0.0-...-0637ba6 Latest Latest
Warning

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

Go to latest
Published: Sep 23, 2018 License: GPL-3.0 Imports: 1 Imported by: 0

Documentation

Overview

Package dom provides some type-safe wrappers for HTML DOM manipulation through syscall/js.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func GetElementById

func GetElementById(id string) js.Value

Types

type Canvas

type Canvas struct{ js.Value }

func GetCanvas

func GetCanvas(id string) Canvas

func (Canvas) GetContext2D

func (e Canvas) GetContext2D() Context2D

type Context2D

type Context2D struct{ js.Value }

func (Context2D) DrawImage

func (e Context2D) DrawImage(img Img, x, y float64)

func (Context2D) LineTo

func (e Context2D) LineTo(x, y float64)

func (Context2D) MoveTo

func (e Context2D) MoveTo(x, y float64)

func (Context2D) Stroke

func (e Context2D) Stroke()

type Document

type Document struct{ js.Value }

func GetDocument

func GetDocument() Document

func (Document) CreateElement

func (e Document) CreateElement(typ string) js.Value

func (Document) CreateImg

func (e Document) CreateImg() Img

type Img

type Img struct{ js.Value }

func (Img) SetOnload

func (e Img) SetOnload(f func())

func (Img) SetSrc

func (e Img) SetSrc(src string)

Jump to

Keyboard shortcuts

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