systemlog

package
v0.2.0 Latest Latest
Warning

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

Go to latest
Published: Oct 7, 2023 License: Apache-2.0 Imports: 3 Imported by: 0

Documentation

Rendered for js/wasm

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Add

func Add(options MessageOptions) (ret js.Promise[js.Void])

Add calls the function "WEBEXT.systemLog.add" directly.

func FuncAdd

func FuncAdd() (fn js.Func[func(options MessageOptions) js.Promise[js.Void]])

FuncAdd returns the function "WEBEXT.systemLog.add".

func HasFuncAdd

func HasFuncAdd() bool

HasFuncAdd returns true if the function "WEBEXT.systemLog.add" exists.

func TryAdd

func TryAdd(options MessageOptions) (ret js.Promise[js.Void], exception js.Any, ok bool)

TryAdd calls the function "WEBEXT.systemLog.add" in a try/catch block and returns (_, err, ok = false) when it went through the catch clause.

Types

type MessageOptions

type MessageOptions struct {
	// Message is "MessageOptions.message"
	//
	// Optional
	Message js.String

	FFI_USE bool
}

func (*MessageOptions) FreeMembers

func (p *MessageOptions) FreeMembers(recursive bool)

FreeMembers frees fields with heap reference, if recursive is true free all heap references reachable from p.

func (MessageOptions) FromRef

func (p MessageOptions) FromRef(ref js.Ref) MessageOptions

FromRef calls UpdateFrom and returns a MessageOptions with all fields set.

func (MessageOptions) New

func (p MessageOptions) New() js.Ref

New creates a new MessageOptions in the application heap.

func (*MessageOptions) Update

func (p *MessageOptions) Update(ref js.Ref)

Update writes all fields of the p to the heap object referenced by ref.

func (*MessageOptions) UpdateFrom

func (p *MessageOptions) UpdateFrom(ref js.Ref)

UpdateFrom copies value of all fields of the heap object to p.

type VoidCallback

type VoidCallback[T any] struct {
	Fn  func(arg T, this js.Ref) js.Ref
	Arg T
}

func (*VoidCallback[T]) DispatchCallback

func (cb *VoidCallback[T]) DispatchCallback(
	targetPC uintptr, ctx *js.CallbackContext,
)

func (*VoidCallback[T]) Register

func (cb *VoidCallback[T]) Register() js.Func[func()]

type VoidCallbackFunc

type VoidCallbackFunc func(this js.Ref) js.Ref

func (VoidCallbackFunc) DispatchCallback

func (fn VoidCallbackFunc) DispatchCallback(
	targetPC uintptr, ctx *js.CallbackContext,
)

func (VoidCallbackFunc) Register

func (fn VoidCallbackFunc) Register() js.Func[func()]

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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