gojspromise

package module
Version: v0.0.0-...-0c5e2c0 Latest Latest
Warning

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

Go to latest
Published: Nov 23, 2020 License: Apache-2.0 Imports: 1 Imported by: 0

README

gojspromise

Golang promise package for syscall/js heavily borrowed from: https://github.com/johnstarich/go-wasm

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewGoPromise

func NewGoPromise() (resolve, reject Resolver, promise GoPromise)

func SingleUseFunc

func SingleUseFunc(fn func(this js.Value, args []js.Value) interface{}) js.Func

Types

type GoPromise

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

func (GoPromise) Catch

func (p GoPromise) Catch(fn func(rejectedReason interface{}) interface{}) GoPromise

func (GoPromise) Then

func (p GoPromise) Then(fn func(value interface{}) interface{}) GoPromise

type Resolver

type Resolver func(interface{})

Jump to

Keyboard shortcuts

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