message

package
v0.0.28 Latest Latest
Warning

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

Go to latest
Published: Sep 6, 2023 License: Apache-2.0 Imports: 2 Imported by: 0

Documentation

Rendered for js/wasm

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type ExtSender

type ExtSender struct{}

ExtSender sends messages within our own extension.

ExtSender implements the Sender interface.

func NewLocalSender

func NewLocalSender() *ExtSender

NewLocalSender returns a ExtSender for sending messages within our own extension.

func (*ExtSender) Send

func (e *ExtSender) Send(ctx jsutil.AsyncContext, msg js.Value) (js.Value, error)

Send implements Sender.Send().

type Sender

type Sender interface {
	// Send sends a message. Response (or an error) are returned. See:
	//   https://developer.chrome.com/docs/extensions/reference/runtime/#method-sendMessage
	Send(ctx jsutil.AsyncContext, msg js.Value) (js.Value, error)
}

Sender specifies the interface for a type that sends messages.

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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