domino

package
v0.0.0-...-3316a88 Latest Latest
Warning

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

Go to latest
Published: Mar 15, 2022 License: BSD-3-Clause Imports: 21 Imported by: 0

Documentation

Index

Constants

View Source
const (
	Value  = 1
	Attr   = 2
	RmAttr = 3
	Rm     = 4
	Mv     = 5
	Insert = 6
)

Variables

This section is empty.

Functions

func Btoa

func Btoa(bs []byte) string

func IntrospectError

func IntrospectError(err error, script string)

Types

type Domino

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

func NewDomino

func NewDomino(
	html string,
	xhr func(req *http.Request) (resp *http.Response, err error),
	query func(sel, prop string) (val string, err error),
) (d *Domino)

func (*Domino) CloseDoc

func (d *Domino) CloseDoc() (err error)

CloseDoc fires DOMContentLoaded to trigger $(document).ready(..)

func (*Domino) Exec

func (d *Domino) Exec(script string, initial bool) (res string, err error)

func (*Domino) Exec56

func (d *Domino) Exec56(script string, initial bool) (res string, err error)

func (*Domino) Exec6

func (d *Domino) Exec6(script string, initial bool) (res string, err error)

func (*Domino) List

func (d *Domino) List(path string) (l []string)

func (*Domino) PutAttr

func (d *Domino) PutAttr(selector, attr, val string) (ok bool, err error)

Put change into html (e.g. from input field mutation)

func (*Domino) Retrieve

func (d *Domino) Retrieve(path string) string

func (*Domino) Start

func (d *Domino) Start()

func (*Domino) Stop

func (d *Domino) Stop()

func (*Domino) TrackChanges

func (d *Domino) TrackChanges() (html string, changed bool, err error)

func (*Domino) TriggerClick

func (d *Domino) TriggerClick(selector string) (newHTML string, ok bool, err error)

TriggerClick, and return the result html ...then HTML5 parse it, diff the node tree (probably faster and cleaner than anything else)

func (*Domino) Write

func (d *Domino) Write(path, val string) (err error)

type Mutation

type Mutation struct {
	Time time.Time
	Type MutationType
	Path string
	Tag  string
	Node map[string]string
}

type MutationType

type MutationType int

func (MutationType) String

func (t MutationType) String() string

Jump to

Keyboard shortcuts

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