page

package
v0.0.0-...-ae86d3b Latest Latest
Warning

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

Go to latest
Published: Sep 18, 2023 License: MIT Imports: 2 Imported by: 0

Documentation

Index

Constants

View Source
const (
	// ContainerClassName is the class name of the container
	ContainerClassName = "container"
	// HeaderClassName is the class name of the header
	HeaderClassName = "header"
	// ContentClassName is the class name of the content
	ContentClassName = "content"
)

Variables

This section is empty.

Functions

This section is empty.

Types

type Instance

type Instance struct {
	Title string
	// contains filtered or unexported fields
}

Instance is a struct that implements the Page interface

func NewPage

func NewPage(title string) *Instance

NewPage returns a new Instance

func (*Instance) Alert

func (p *Instance) Alert() js.Value

Alert returns the alert

func (*Instance) Document

func (p *Instance) Document() js.Value

Document returns the document

func (*Instance) GetElementByID

func (p *Instance) GetElementByID(id string) js.Value

GetElementByID returns the element by the given id

func (*Instance) JSON

func (p *Instance) JSON() js.Value

JSON returns the JSON

func (*Instance) LoadPage

func (p *Instance) LoadPage()

LoadPage loads the page

func (*Instance) Run

func (p *Instance) Run()

Run runs the page

func (*Instance) WebSocket

func (p *Instance) WebSocket() js.Value

WebSocket returns the websocket

type Page

type Page interface {
	LoadPage()
	Run()
}

Page is an interface that represents a page

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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