events

package
v0.0.0-...-6e88d74 Latest Latest
Warning

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

Go to latest
Published: Jul 22, 2023 License: GPL-3.0 Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ValueIsInstanceOfEvent

func ValueIsInstanceOfEvent(v js.Value) bool

func ValueIsInstanceOfMessageEvent

func ValueIsInstanceOfMessageEvent(v js.Value) bool

Types

type CloseEvent

type CloseEvent struct {
	Event
}

func NewCloseEventFromJSValue

func NewCloseEventFromJSValue(jsvalue js.Value) (*CloseEvent, error)

func (*CloseEvent) GetCode

func (self *CloseEvent) GetCode() (ret int, err error)

func (*CloseEvent) GetReason

func (self *CloseEvent) GetReason() (ret string, err error)

func (*CloseEvent) GetWasClean

func (self *CloseEvent) GetWasClean() (ret bool, err error)

type ErrorEvent

type ErrorEvent struct {
	Event
}

func NewErrorEventFromJSValue

func NewErrorEventFromJSValue(jsvalue js.Value) (*ErrorEvent, error)

func (*ErrorEvent) GetColno

func (self *ErrorEvent) GetColno() (ret int, err error)

func (*ErrorEvent) GetFilename

func (self *ErrorEvent) GetFilename() (ret string, err error)

func (*ErrorEvent) GetLineno

func (self *ErrorEvent) GetLineno() (ret int, err error)

func (*ErrorEvent) GetMessage

func (self *ErrorEvent) GetMessage() (ret string, err error)

type Event

type Event struct {
	JSValue js.Value
}

func NewEventFromJSValue

func NewEventFromJSValue(jsvalue js.Value) (*Event, error)

type MessageEvent

type MessageEvent struct {
	Event
}

func NewMessageEventFromJSValue

func NewMessageEventFromJSValue(jsvalue js.Value) (*MessageEvent, error)

func (*MessageEvent) GetData

func (self *MessageEvent) GetData() (ret js.Value, err error)

https://developer.mozilla.org/en-US/docs/Web/API/MessageEvent/data says data can be of any type, so, probably, user have to decide what to do with it

func (*MessageEvent) GetLastEventId

func (self *MessageEvent) GetLastEventId() (ret string, err error)

func (*MessageEvent) GetOrigin

func (self *MessageEvent) GetOrigin() (ret string, err error)

TODO: testing required

func (*MessageEvent) GetPorts

func (self *MessageEvent) GetPorts() (ret js.Value, err error)

TODO: work required

func (*MessageEvent) GetSource

func (self *MessageEvent) GetSource() (ret js.Value, err error)

TODO: work required

Jump to

Keyboard shortcuts

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