dom

package
v0.0.0-...-d048fa0 Latest Latest
Warning

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

Go to latest
Published: Sep 18, 2022 License: BSD-3-Clause Imports: 23 Imported by: 0

Documentation

Index

Constants

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

Variables

View Source
var (
	Geom  func(sel string) (string, error)
	Query func(sel, prop string) (val string, err error)
)
View Source
var HTMLElementPrototype js.Value
View Source
var HTMLInputElementPrototype js.Value
View Source
var NodePrototype js.Value
View Source
var TextPrototype js.Value

Functions

func Calls

func Calls(recv Gettable) (cs []string)

func GetCall

func GetCall(recv Gettable, k string) (res js.Value, ok bool)

GetCall translates a js method or getter call into a Go method call.

func HasCall

func HasCall(recv Gettable, k string) bool

func Main

func Main(dir, fn string) (err error)

func Mutations

func Mutations() <-chan Mutation

func NewEvent

func NewEvent(t string, opts map[string]any) (o *js.Object)

func NewMouseEvent

func NewMouseEvent(t string, opts map[string]any) (o *js.Object)

func NewMutObserver

func NewMutObserver() *js.Object

func PrintCalls

func PrintCalls()

func ResetCalls

func ResetCalls()

func W3C

func W3C(testFn string) (err error)

Types

type Animation

type Animation struct {
}

func (*Animation) Cancel

func (a *Animation) Cancel()

func (*Animation) Delete

func (a *Animation) Delete(key string) bool

func (*Animation) Get

func (a *Animation) Get(k string) (v js.Value)

func (*Animation) Getters

func (a *Animation) Getters() map[string]bool

func (*Animation) Has

func (a *Animation) Has(key string) bool

func (*Animation) Keys

func (a *Animation) Keys() []string

func (*Animation) Obj

func (a *Animation) Obj() *js.Object

func (*Animation) Props

func (a *Animation) Props() map[string]bool

func (*Animation) Set

func (a *Animation) Set(k string, desc js.PropertyDescriptor) bool

type Attr

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

func (*Attr) Delete

func (a *Attr) Delete(k string) bool

func (*Attr) Get

func (a *Attr) Get(k string) (v js.Value)

func (*Attr) Has

func (a *Attr) Has(k string) bool

func (*Attr) Keys

func (a *Attr) Keys() []string

func (*Attr) Obj

func (a *Attr) Obj() *js.Object

func (*Attr) Set

func (a *Attr) Set(k string, desc js.PropertyDescriptor) bool

type Call

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

type ComputedStyle

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

func (*ComputedStyle) Delete

func (cs *ComputedStyle) Delete(k string) bool

func (*ComputedStyle) Get

func (cs *ComputedStyle) Get(k string) (v js.Value)

func (*ComputedStyle) GetPropertyValue

func (cs *ComputedStyle) GetPropertyValue(k string) string

func (*ComputedStyle) Getters

func (cs *ComputedStyle) Getters() map[string]bool

func (*ComputedStyle) Has

func (cs *ComputedStyle) Has(k string) bool

func (*ComputedStyle) Keys

func (cs *ComputedStyle) Keys() []string

func (*ComputedStyle) Obj

func (cs *ComputedStyle) Obj() *js.Object

func (*ComputedStyle) Props

func (cs *ComputedStyle) Props() map[string]bool

func (*ComputedStyle) Set

func (cs *ComputedStyle) Set(k string, desc js.PropertyDescriptor) bool

type Console

type Console struct {
	Log func(xs ...interface{}) `json:"log"`
}

func NewConsole

func NewConsole() (c *Console)

type DOMParser

type DOMParser struct{}

func NewDOMParser

func NewDOMParser() *DOMParser

func (*DOMParser) Delete

func (dp *DOMParser) Delete(k string) bool

func (*DOMParser) Get

func (dp *DOMParser) Get(k string) (v js.Value)

func (*DOMParser) Getters

func (dp *DOMParser) Getters() map[string]bool

func (*DOMParser) Has

func (dp *DOMParser) Has(k string) bool

func (*DOMParser) Keys

func (dp *DOMParser) Keys() []string

func (*DOMParser) Obj

func (dp *DOMParser) Obj() *js.Object

func (*DOMParser) Props

func (dp *DOMParser) Props() map[string]bool

func (*DOMParser) Set

func (dp *DOMParser) Set(k string, desc js.PropertyDescriptor) bool

type DOMRect

type DOMRect struct{}

func (*DOMRect) Delete

func (dr *DOMRect) Delete(k string) bool

func (*DOMRect) Get

func (dr *DOMRect) Get(k string) (v js.Value)

func (*DOMRect) Getters

func (dr *DOMRect) Getters() map[string]bool

func (*DOMRect) Has

func (dr *DOMRect) Has(k string) bool

func (*DOMRect) Keys

func (dr *DOMRect) Keys() []string

func (*DOMRect) Obj

func (dr *DOMRect) Obj() *js.Object

func (*DOMRect) Props

func (dr *DOMRect) Props() map[string]bool

func (*DOMRect) Set

func (dr *DOMRect) Set(k string, desc js.PropertyDescriptor) bool

type Document

type Document struct {
	Window *Window
	// contains filtered or unexported fields
}

func Init

func Init(r *js.Runtime, url, htm, script string) (d *Document, err error)

func NewDocument

func NewDocument(doc *html.Node) (d *Document)

func (*Document) ActiveElement

func (d *Document) ActiveElement() *js.Object

func (*Document) AddEventListener

func (d *Document) AddEventListener(e string, fn *js.Object, opts ...any)

func (*Document) All

func (d *Document) All() *js.Object

func (*Document) AttachEvent

func (d *Document) AttachEvent(e string, f *js.Object, opts ...any)

func (*Document) Body

func (d *Document) Body() *js.Object

func (*Document) ChildNodes

func (d *Document) ChildNodes() *js.Object

func (*Document) Children

func (d *Document) Children() *js.Object

func (*Document) CloneNode

func (d *Document) CloneNode(deep ...bool) *Element

func (*Document) Close

func (d *Document) Close() (err error)

func (*Document) Cookie

func (d *Document) Cookie() string

func (*Document) CreateComment

func (d *Document) CreateComment(data string) *Element

func (*Document) CreateDocumentFragment

func (d *Document) CreateDocumentFragment(opts ...any) *DocumentFragment

func (*Document) CreateElement

func (d *Document) CreateElement(tag string) *Element

func (*Document) CreateElementNS

func (d *Document) CreateElementNS(uri, qn string, opts ...any) *Element

func (*Document) CreateEvent

func (d *Document) CreateEvent(t string) *Event

func (*Document) CreateProcessingInstruction

func (d *Document) CreateProcessingInstruction(target, data string) *Element

func (*Document) CreateTextNode

func (d *Document) CreateTextNode(args ...string) *Element

func (*Document) CreateTreeWalker

func (d *Document) CreateTreeWalker(opts ...any) *TreeWalker

func (*Document) DefaultView

func (d *Document) DefaultView() *Window

func (*Document) Delete

func (d *Document) Delete(key string) bool

func (*Document) DispatchEvent

func (d *Document) DispatchEvent(e *Event)

func (*Document) Doc

func (d *Document) Doc() *html.Node

func (*Document) DocumentElement

func (d *Document) DocumentElement() *js.Object

func (*Document) Domain

func (d *Document) Domain() string

func (*Document) Element

func (d *Document) Element() *Element

func (*Document) Get

func (d *Document) Get(key string) js.Value

func (*Document) GetElementById

func (d *Document) GetElementById(id string) *Element

func (*Document) GetElementsByClassName

func (d *Document) GetElementsByClassName(cl ...string) *HTMLCollection

func (*Document) GetElementsByName

func (d *Document) GetElementsByName(nm string) (els []*Element)

func (*Document) GetElementsByTagName

func (d *Document) GetElementsByTagName(tag string) *HTMLCollection

func (*Document) Getters

func (d *Document) Getters() map[string]bool

func (*Document) Has

func (d *Document) Has(key string) bool

func (*Document) Head

func (d *Document) Head() *js.Object

func (*Document) Implementation

func (d *Document) Implementation() js.Value

func (*Document) Keys

func (d *Document) Keys() []string

func (*Document) Location

func (d *Document) Location() *js.Object

func (*Document) NodeType

func (d *Document) NodeType() int

func (*Document) Obj

func (d *Document) Obj() (o *js.Object)

func (*Document) ParentNode

func (d *Document) ParentNode() js.Value

func (*Document) Props

func (d *Document) Props() map[string]bool

func (*Document) QuerySelector

func (d *Document) QuerySelector(s string) *Element

func (*Document) QuerySelectorAll

func (d *Document) QuerySelectorAll(s string) []*Element

func (*Document) Referrer

func (d *Document) Referrer() string

func (*Document) RemoveEventListener

func (d *Document) RemoveEventListener(e string, f func(js.FunctionCall) js.Value, opts ...any)

func (*Document) Scripts

func (d *Document) Scripts() *js.Object

Scripts just returns an empty list

func (*Document) Set

func (d *Document) Set(key string, desc js.PropertyDescriptor) bool

func (*Document) StyleSheets

func (d *Document) StyleSheets() js.Value

StyleSheets just returns an empty list

func (*Document) Title

func (d *Document) Title() js.Value

func (*Document) ToString

func (d *Document) ToString() (s string)

func (*Document) Write

func (d *Document) Write(s string)

type DocumentFragment

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

func NewDocumentFragment

func NewDocumentFragment(d *Document) (df *DocumentFragment)

func (*DocumentFragment) AppendChild

func (df *DocumentFragment) AppendChild(o interface{}) *Element

func (*DocumentFragment) ChildNodes

func (df *DocumentFragment) ChildNodes() js.Value

func (*DocumentFragment) Children

func (df *DocumentFragment) Children() js.Value

func (*DocumentFragment) CloneNode

func (df *DocumentFragment) CloneNode(deep ...bool) *DocumentFragment

func (*DocumentFragment) CreateElement

func (df *DocumentFragment) CreateElement(tag string) *Element

func (*DocumentFragment) Delete

func (df *DocumentFragment) Delete(key string) bool

func (*DocumentFragment) FirstChild

func (df *DocumentFragment) FirstChild() *js.Object

func (*DocumentFragment) Get

func (df *DocumentFragment) Get(key string) js.Value

func (*DocumentFragment) GetElementById

func (df *DocumentFragment) GetElementById(id string) *Element

func (*DocumentFragment) GetElementsByTagName

func (df *DocumentFragment) GetElementsByTagName(tag string) *HTMLCollection

func (*DocumentFragment) Getters

func (df *DocumentFragment) Getters() map[string]bool

func (*DocumentFragment) Has

func (df *DocumentFragment) Has(key string) bool

func (*DocumentFragment) InsertBefore

func (df *DocumentFragment) InsertBefore(nu, ol any) *Element

func (*DocumentFragment) Keys

func (df *DocumentFragment) Keys() []string

func (*DocumentFragment) LastChild

func (df *DocumentFragment) LastChild() *js.Object

func (*DocumentFragment) NodeName

func (df *DocumentFragment) NodeName() string

func (*DocumentFragment) NodeType

func (df *DocumentFragment) NodeType() int

func (*DocumentFragment) NodeValue

func (df *DocumentFragment) NodeValue() any

func (*DocumentFragment) Obj

func (df *DocumentFragment) Obj() *js.Object

func (*DocumentFragment) OwnerDocument

func (df *DocumentFragment) OwnerDocument() js.Value

func (*DocumentFragment) Props

func (df *DocumentFragment) Props() map[string]bool

func (*DocumentFragment) QuerySelectorAll

func (df *DocumentFragment) QuerySelectorAll(s string) (els []*Element)

func (*DocumentFragment) RemoveChild

func (df *DocumentFragment) RemoveChild(c interface{}) *Element

func (*DocumentFragment) Set

func (df *DocumentFragment) Set(key string, desc js.PropertyDescriptor) bool

type Element

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

func CreateElement

func CreateElement(d *Document, tagName string) *Element

func CreateElementNS

func CreateElementNS(d *Document, uri, qn string) *Element

func (*Element) AddEventListener

func (el *Element) AddEventListener(e string, fn *js.Object, opts ...any)

func (*Element) Animate

func (el *Element) Animate(opts ...any) *Animation

func (*Element) AppendChild

func (el *Element) AppendChild(c any) any

func (*Element) AppendData

func (el *Element) AppendData(s string)

func (*Element) Attributes

func (el *Element) Attributes() js.Value

func (*Element) BubbledClick

func (el *Element) BubbledClick()

func (*Element) Checked

func (el *Element) Checked() bool

func (*Element) ChildNodes

func (el *Element) ChildNodes() *js.Object

func (*Element) Children

func (el *Element) Children() *js.Object

func (*Element) ClassName

func (el *Element) ClassName() string

func (*Element) Clic

func (el *Element) Clic() (consumed bool)

func (*Element) Click

func (el *Element) Click(xs ...interface{}) js.Value

func (*Element) CloneNode

func (el *Element) CloneNode(deep ...bool) *Element

func (*Element) Contains

func (el *Element) Contains(o *Element) bool

func (*Element) Content

func (el *Element) Content() js.Value

func (*Element) ContentWindow

func (el *Element) ContentWindow() js.Value

func (*Element) Data

func (el *Element) Data() string

func (*Element) Delete

func (el *Element) Delete(key string) bool

func (*Element) DeleteData

func (el *Element) DeleteData(i, n int)

func (*Element) DispatchEvent

func (el *Element) DispatchEvent(ei any) bool

func (*Element) FirstChild

func (el *Element) FirstChild() *js.Object

func (*Element) Get

func (el *Element) Get(key string) js.Value

func (*Element) GetAttribute

func (el *Element) GetAttribute(k string, opts ...any) interface{}

func (*Element) GetBoundingClientRect

func (el *Element) GetBoundingClientRect() *DOMRect

func (*Element) GetClientRects

func (el *Element) GetClientRects() *js.Object

func (*Element) GetElementsByClassName

func (el *Element) GetElementsByClassName(class string) (hc *HTMLCollection)

func (*Element) GetElementsByTagName

func (el *Element) GetElementsByTagName(tag string) (hc *HTMLCollection)

func (*Element) GetRootNode

func (el *Element) GetRootNode(opts ...any) js.Value

func (*Element) Getters

func (el *Element) Getters() map[string]bool

func (*Element) Has

func (el *Element) Has(key string) bool

func (*Element) HasAttribute

func (el *Element) HasAttribute(k string) bool

func (*Element) HasChildNodes

func (el *Element) HasChildNodes() bool

func (*Element) Hash

func (el *Element) Hash() js.Value

func (*Element) Hostname

func (el *Element) Hostname() js.Value

func (*Element) Href

func (el *Element) Href() js.Value

func (*Element) Id

func (el *Element) Id() string

func (*Element) InnerHTML

func (el *Element) InnerHTML() string

func (*Element) InsertBefore

func (el *Element) InsertBefore(nu, old any) any

func (*Element) InsertData

func (el *Element) InsertData(i int, s string)

func (*Element) IsEqualNode

func (el *Element) IsEqualNode(n any) bool

func (*Element) IsSameNode

func (el *Element) IsSameNode(n ...any) bool

func (*Element) Keys

func (el *Element) Keys() []string

func (*Element) LastChild

func (el *Element) LastChild() *js.Object

func (*Element) Length

func (el *Element) Length() int

func (*Element) LocalName

func (el *Element) LocalName() string

func (*Element) Matches

func (el *Element) Matches(s string) bool

func (*Element) Name

func (el *Element) Name() js.Value

func (*Element) NextSibling

func (el *Element) NextSibling() *js.Object

func (*Element) Node

func (el *Element) Node() *html.Node

func (*Element) NodeName

func (el *Element) NodeName() string

func (*Element) NodeType

func (el *Element) NodeType() (i int)

func (*Element) NodeValue

func (el *Element) NodeValue() js.Value

func (*Element) Normalize

func (el *Element) Normalize()

func (*Element) Obj

func (el *Element) Obj() (obj *js.Object)

func (*Element) OffsetHeight

func (el *Element) OffsetHeight() int

func (*Element) OffsetWidth

func (el *Element) OffsetWidth() int

func (*Element) Options

func (el *Element) Options() *HTMLCollection

Options of a <select> element

func (*Element) OuterHTML

func (el *Element) OuterHTML() string

func (*Element) OwnerDocument

func (el *Element) OwnerDocument() js.Value

func (*Element) ParentElement

func (el *Element) ParentElement() *js.Object

func (*Element) ParentNode

func (el *Element) ParentNode() js.Value

func (*Element) Pathname

func (el *Element) Pathname() js.Value

func (*Element) PreviousSibling

func (el *Element) PreviousSibling() *js.Object

func (*Element) Props

func (el *Element) Props() map[string]bool

func (*Element) QuerySelector

func (el *Element) QuerySelector(s string) *Element

func (*Element) QuerySelectorAll

func (el *Element) QuerySelectorAll(s string) (els []*Element)

func (*Element) Remove

func (el *Element) Remove() js.Value

func (*Element) RemoveAttribute

func (el *Element) RemoveAttribute(a string)

func (*Element) RemoveChild

func (el *Element) RemoveChild(c any) *Element

func (*Element) RemoveEventListener

func (el *Element) RemoveEventListener(e string, f func(js.FunctionCall) js.Value, opts ...any)

func (*Element) ReplaceChild

func (el *Element) ReplaceChild(nue, ole *Element) *Element

func (*Element) ReplaceData

func (el *Element) ReplaceData(i, n int, s string)

func (*Element) Selected

func (el *Element) Selected() string

func (*Element) Set

func (el *Element) Set(key string, desc js.PropertyDescriptor) bool

func (*Element) SetAttribute

func (el *Element) SetAttribute(k, v string)

func (*Element) SplitText

func (el *Element) SplitText(i int) *Element

func (*Element) Src

func (el *Element) Src() js.Value

func (*Element) Style

func (el *Element) Style() *js.Object

func (*Element) SubstringData

func (el *Element) SubstringData(i, n int) string

func (*Element) TagName

func (el *Element) TagName() string

func (*Element) TextContent

func (el *Element) TextContent() string

func (*Element) ToString

func (el *Element) ToString() (s string)

func (*Element) Type

func (el *Element) Type() string

func (*Element) Value

func (el *Element) Value() string

func (*Element) Window

func (el *Element) Window() *Window

type Event

type Event struct {
	Type             string
	Consumed         bool
	DefaultPrevented bool
	Phase            int
	Bubbles          bool
	CancelBubble     bool
	Cancelable       bool
	IsTrusted        bool

	CurrentTarget *Element
	Target        *Element
	SrcElement    *Element
	// contains filtered or unexported fields
}

func (*Event) Delete

func (e *Event) Delete(key string) (ok bool)

func (*Event) Get

func (e *Event) Get(key string) js.Value

func (*Event) Getters

func (e *Event) Getters() map[string]bool

func (*Event) Has

func (e *Event) Has(key string) bool

func (*Event) InitEvent

func (e *Event) InitEvent(t string, opts ...any)

func (*Event) Keys

func (e *Event) Keys() []string

func (*Event) Obj

func (e *Event) Obj() (o *js.Object)

func (*Event) PreventDefault

func (e *Event) PreventDefault()

func (*Event) Props

func (e *Event) Props() map[string]bool

func (*Event) ReturnValue

func (e *Event) ReturnValue() bool

func (*Event) Set

func (e *Event) Set(key string, desc js.PropertyDescriptor) bool

func (*Event) StopImmediatePropagation

func (e *Event) StopImmediatePropagation()

func (*Event) StopPropagation

func (e *Event) StopPropagation()

type Gettable

type Gettable interface {
	Obj() *js.Object
	Getters() map[string]bool
	Props() map[string]bool
}

type HTMLCollection

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

func (*HTMLCollection) ChildNodes

func (hc *HTMLCollection) ChildNodes() (es []*Element)

func (*HTMLCollection) Delete

func (hc *HTMLCollection) Delete(k string) bool

func (*HTMLCollection) Get

func (hc *HTMLCollection) Get(k string) (v js.Value)

func (*HTMLCollection) Getters

func (hc *HTMLCollection) Getters() map[string]bool

func (*HTMLCollection) Has

func (hc *HTMLCollection) Has(k string) bool

func (*HTMLCollection) Item

func (hc *HTMLCollection) Item(j any) *Element

func (*HTMLCollection) Keys

func (hc *HTMLCollection) Keys() []string

func (*HTMLCollection) Length

func (hc *HTMLCollection) Length() int

func (*HTMLCollection) Obj

func (hc *HTMLCollection) Obj() *js.Object

func (*HTMLCollection) Props

func (hc *HTMLCollection) Props() map[string]bool

func (*HTMLCollection) Set

func (hc *HTMLCollection) Set(k string, desc js.PropertyDescriptor) bool

func (*HTMLCollection) ToString

func (hc *HTMLCollection) ToString() string

type History

type History struct{}

type Implementation

type Implementation struct{}

func (*Implementation) CreateHTMLDocument

func (impl *Implementation) CreateHTMLDocument(title ...string) (d *Document)

func (*Implementation) Delete

func (impl *Implementation) Delete(key string) bool

func (*Implementation) Get

func (impl *Implementation) Get(k string) (v js.Value)

func (*Implementation) Getters

func (impl *Implementation) Getters() map[string]bool

func (*Implementation) Has

func (impl *Implementation) Has(key string) bool

func (*Implementation) HasFeature

func (impl *Implementation) HasFeature(args ...any) bool

func (*Implementation) Keys

func (impl *Implementation) Keys() []string

func (*Implementation) Obj

func (impl *Implementation) Obj() *js.Object

func (*Implementation) Props

func (impl *Implementation) Props() map[string]bool

func (*Implementation) Set

func (impl *Implementation) Set(k string, desc js.PropertyDescriptor) bool

type Location

type Location struct {
	Protocol string
	Host     string
	Hostname string
	Port     string
	Href     string
	Pathname string
	Search   string
	Hash     string
}

func NewLocation

func NewLocation(origin string) (l *Location)

func (*Location) Delete

func (l *Location) Delete(key string) bool

func (*Location) Get

func (l *Location) Get(k string) (v js.Value)

func (*Location) Getters

func (l *Location) Getters() map[string]bool

func (*Location) Has

func (l *Location) Has(key string) bool

func (*Location) Keys

func (l *Location) Keys() []string

func (*Location) Obj

func (l *Location) Obj() *js.Object

func (*Location) Props

func (l *Location) Props() map[string]bool

func (*Location) Replace

func (l *Location) Replace(u string)

func (*Location) Set

func (l *Location) Set(k string, desc js.PropertyDescriptor) bool

type MouseEvent

type MouseEvent struct {
	Event
}

type MutObserver

type MutObserver struct{}

func (*MutObserver) Delete

func (m *MutObserver) Delete(k string) bool

func (*MutObserver) Get

func (m *MutObserver) Get(k string) (v js.Value)

func (*MutObserver) Getters

func (m *MutObserver) Getters() map[string]bool

func (*MutObserver) Has

func (m *MutObserver) Has(k string) bool

func (*MutObserver) Keys

func (m *MutObserver) Keys() []string

func (*MutObserver) Obj

func (m *MutObserver) Obj() *js.Object

func (*MutObserver) Observe

func (m *MutObserver) Observe(target *Element, opts map[string]any)

func (*MutObserver) Props

func (m *MutObserver) Props() map[string]bool

func (*MutObserver) Set

func (m *MutObserver) Set(k string, desc js.PropertyDescriptor) bool

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

type NamedNodeMap

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

func (*NamedNodeMap) Delete

func (nm *NamedNodeMap) Delete(k string) bool

func (*NamedNodeMap) Get

func (nm *NamedNodeMap) Get(k string) (v js.Value)

func (*NamedNodeMap) Has

func (nm *NamedNodeMap) Has(k string) bool

func (*NamedNodeMap) Keys

func (nm *NamedNodeMap) Keys() []string

func (*NamedNodeMap) Obj

func (nm *NamedNodeMap) Obj() *js.Object

func (*NamedNodeMap) Set

func (nm *NamedNodeMap) Set(k string, desc js.PropertyDescriptor) bool
type Navigator struct {
	UserAgent string `json:"userAgent"`
}

type SVG

type SVG struct{}

func NewSVG

func NewSVG(doc string) *SVG

func (*SVG) Delete

func (s *SVG) Delete(k string) bool

func (*SVG) Get

func (s *SVG) Get(k string) (v js.Value)

func (*SVG) Getters

func (s *SVG) Getters() map[string]bool

func (*SVG) Has

func (s *SVG) Has(k string) bool

func (*SVG) Keys

func (s *SVG) Keys() []string

func (*SVG) Obj

func (s *SVG) Obj() *js.Object

func (*SVG) Props

func (s *SVG) Props() map[string]bool

func (*SVG) Set

func (s *SVG) Set(k string, desc js.PropertyDescriptor) bool

type Style

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

Style represents a CSSStyleDeclaration object

func (*Style) Delete

func (s *Style) Delete(key string) bool

func (*Style) Get

func (s *Style) Get(k string) (v js.Value)

func (*Style) GetPropertyValue

func (s *Style) GetPropertyValue(p string) string

func (*Style) Getters

func (s *Style) Getters() map[string]bool

func (*Style) Has

func (s *Style) Has(k string) (yes bool)

func (*Style) Keys

func (s *Style) Keys() []string

func (*Style) Length

func (s *Style) Length() int

func (*Style) Obj

func (s *Style) Obj() *js.Object

func (*Style) Props

func (s *Style) Props() map[string]bool

func (*Style) Set

func (s *Style) Set(k string, desc js.PropertyDescriptor) bool

type TreeWalker

type TreeWalker struct{}

func NewTreeWalker

func NewTreeWalker() *TreeWalker

func (*TreeWalker) Delete

func (tw *TreeWalker) Delete(k string) bool

func (*TreeWalker) Get

func (tw *TreeWalker) Get(k string) (v js.Value)

func (*TreeWalker) Getters

func (tw *TreeWalker) Getters() map[string]bool

func (*TreeWalker) Has

func (tw *TreeWalker) Has(k string) bool

func (*TreeWalker) Keys

func (tw *TreeWalker) Keys() []string

func (*TreeWalker) Obj

func (tw *TreeWalker) Obj() *js.Object

func (*TreeWalker) Props

func (tw *TreeWalker) Props() map[string]bool

func (*TreeWalker) Set

func (tw *TreeWalker) Set(k string, desc js.PropertyDescriptor) bool

type Window

type Window struct {
	*Document
	*Location
	Navigator
	History
	// contains filtered or unexported fields
}

func NewWindow

func NewWindow(url string, builtinThis *js.Object, d *Document) *Window

func (*Window) Delete

func (w *Window) Delete(key string) bool

func (*Window) Get

func (w *Window) Get(k string) js.Value

func (*Window) Has

func (w *Window) Has(key string) bool

func (*Window) Keys

func (w *Window) Keys() []string

func (*Window) Obj

func (w *Window) Obj() *js.Object

func (*Window) RenderAnimationFrame

func (w *Window) RenderAnimationFrame() (ok bool)

func (*Window) Set

func (w *Window) Set(key string, desc js.PropertyDescriptor) bool

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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