broadcastchannel

package
v1.3.0 Latest Latest
Warning

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

Go to latest
Published: Mar 21, 2022 License: Apache-2.0 Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	//ErrNotImplemented ErrNotImplemented error
	ErrNotImplemented = errors.New("Browser not implemented BroadcastChannel")
)

Functions

func GetInterface

func GetInterface() js.Value

GetJSInterface get the JS interface

Types

type BroadcastChannel

type BroadcastChannel struct {
	eventtarget.EventTarget
}

BroadcastChannel struct

func New

func New(channelname string) (BroadcastChannel, error)

New Get a new channel broadcast

func (BroadcastChannel) BroadcastChannel_

func (b BroadcastChannel) BroadcastChannel_() BroadcastChannel

func (BroadcastChannel) Close

func (c BroadcastChannel) Close() error

Close Close the channel

func (BroadcastChannel) Name

func (c BroadcastChannel) Name() (string, error)

func (BroadcastChannel) OnMessage

func (c BroadcastChannel) OnMessage(handler func(m messageevent.MessageEvent)) (js.Func, error)

func (BroadcastChannel) OnMessageError

func (c BroadcastChannel) OnMessageError(handler func(e event.Event)) (js.Func, error)

func (BroadcastChannel) PostMessage

func (c BroadcastChannel) PostMessage(message interface{}) error

PostMessage Post a message on channel

type BroadcastChannelFrom

type BroadcastChannelFrom interface {
	BroadcastChannel_() BroadcastChannel
}

Jump to

Keyboard shortcuts

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