webapi: github.com/gowebapi/webapi/notification Index | Files

package notification

import "github.com/gowebapi/webapi/notification"

Package notification allows web pages to control the display of system notifications to the end user.

Source: Notifications API Standard (https://notifications.spec.whatwg.org/)

Index

Package Files

doc.go notification.go

func MaxActions Uses

func MaxActions() uint

MaxActions returning attribute 'maxActions' with type uint (idl: unsigned long).

type Direction Uses

type Direction int

enum: NotificationDirection

const (
    Auto Direction = iota
    LeftToRight
    RightToLeft
)

func DirectionFromJS Uses

func DirectionFromJS(value js.Value) Direction

DirectionFromJS is converting a javascript value into a Direction enum value.

func (*Direction) JSValue Uses

func (this *Direction) JSValue() js.Value

JSValue is converting this enum into a javascript object

func (Direction) Value Uses

func (this Direction) Value() string

Value is converting this into javascript defined string value

type GetNotificationOptions Uses

type GetNotificationOptions struct {
    Tag string
}

dictionary: GetNotificationOptions

func GetNotificationOptionsFromJS Uses

func GetNotificationOptionsFromJS(value js.Wrapper) *GetNotificationOptions

GetNotificationOptionsFromJS is allocating a new GetNotificationOptions object and copy all values from input javascript object

func (*GetNotificationOptions) JSValue Uses

func (_this *GetNotificationOptions) JSValue() js.Value

JSValue is allocating a new javasript object and copy all values

type Notification Uses

type Notification struct {
    domcore.EventTarget
}

class: Notification

func New Uses

func New(title string, options *Options) (_result *Notification)

func NotificationFromJS Uses

func NotificationFromJS(value js.Wrapper) *Notification

NotificationFromJS is casting a js.Wrapper into Notification.

func (*Notification) Actions Uses

func (_this *Notification) Actions() *javascript.FrozenArray

Actions returning attribute 'actions' with type javascript.FrozenArray (idl: FrozenArray).

func (*Notification) AddEventClick Uses

func (_this *Notification) AddEventClick(listener func(event *domcore.Event, currentTarget *Notification)) js.Func

AddClick is adding doing AddEventListener for 'Click' on target. This method is returning allocated javascript function that need to be released.

func (*Notification) AddEventClose Uses

func (_this *Notification) AddEventClose(listener func(event *domcore.Event, currentTarget *Notification)) js.Func

AddClose is adding doing AddEventListener for 'Close' on target. This method is returning allocated javascript function that need to be released.

func (*Notification) AddEventError Uses

func (_this *Notification) AddEventError(listener func(event *domcore.Event, currentTarget *Notification)) js.Func

AddError is adding doing AddEventListener for 'Error' on target. This method is returning allocated javascript function that need to be released.

func (*Notification) AddEventShow Uses

func (_this *Notification) AddEventShow(listener func(event *domcore.Event, currentTarget *Notification)) js.Func

AddShow is adding doing AddEventListener for 'Show' on target. This method is returning allocated javascript function that need to be released.

func (*Notification) Badge Uses

func (_this *Notification) Badge() string

Badge returning attribute 'badge' with type string (idl: USVString).

func (*Notification) Body Uses

func (_this *Notification) Body() string

Body returning attribute 'body' with type string (idl: DOMString).

func (*Notification) Close Uses

func (_this *Notification) Close()

func (*Notification) Data Uses

func (_this *Notification) Data() js.Value

Data returning attribute 'data' with type Any (idl: any).

func (*Notification) Dir Uses

func (_this *Notification) Dir() Direction

Dir returning attribute 'dir' with type Direction (idl: NotificationDirection).

func (*Notification) Icon Uses

func (_this *Notification) Icon() string

Icon returning attribute 'icon' with type string (idl: USVString).

func (*Notification) Image Uses

func (_this *Notification) Image() string

Image returning attribute 'image' with type string (idl: USVString).

func (*Notification) Lang Uses

func (_this *Notification) Lang() string

Lang returning attribute 'lang' with type string (idl: DOMString).

func (*Notification) OnClick Uses

func (_this *Notification) OnClick() domcore.EventHandlerFunc

OnClick returning attribute 'onclick' with type domcore.EventHandler (idl: EventHandlerNonNull).

func (*Notification) OnClose Uses

func (_this *Notification) OnClose() domcore.EventHandlerFunc

OnClose returning attribute 'onclose' with type domcore.EventHandler (idl: EventHandlerNonNull).

func (*Notification) OnError Uses

func (_this *Notification) OnError() domcore.EventHandlerFunc

OnError returning attribute 'onerror' with type domcore.EventHandler (idl: EventHandlerNonNull).

func (*Notification) OnShow Uses

func (_this *Notification) OnShow() domcore.EventHandlerFunc

OnShow returning attribute 'onshow' with type domcore.EventHandler (idl: EventHandlerNonNull).

func (*Notification) Renotify Uses

func (_this *Notification) Renotify() bool

Renotify returning attribute 'renotify' with type bool (idl: boolean).

func (*Notification) RequireInteraction Uses

func (_this *Notification) RequireInteraction() bool

RequireInteraction returning attribute 'requireInteraction' with type bool (idl: boolean).

func (*Notification) SetOnClick Uses

func (_this *Notification) SetOnClick(listener func(event *domcore.Event, currentTarget *Notification)) js.Func

SetOnClick is assigning a function to 'onclick'. This This method is returning allocated javascript function that need to be released.

func (*Notification) SetOnClose Uses

func (_this *Notification) SetOnClose(listener func(event *domcore.Event, currentTarget *Notification)) js.Func

SetOnClose is assigning a function to 'onclose'. This This method is returning allocated javascript function that need to be released.

func (*Notification) SetOnError Uses

func (_this *Notification) SetOnError(listener func(event *domcore.Event, currentTarget *Notification)) js.Func

SetOnError is assigning a function to 'onerror'. This This method is returning allocated javascript function that need to be released.

func (*Notification) SetOnShow Uses

func (_this *Notification) SetOnShow(listener func(event *domcore.Event, currentTarget *Notification)) js.Func

SetOnShow is assigning a function to 'onshow'. This This method is returning allocated javascript function that need to be released.

func (*Notification) Silent Uses

func (_this *Notification) Silent() bool

Silent returning attribute 'silent' with type bool (idl: boolean).

func (*Notification) Tag Uses

func (_this *Notification) Tag() string

Tag returning attribute 'tag' with type string (idl: DOMString).

func (*Notification) Timestamp Uses

func (_this *Notification) Timestamp() int

Timestamp returning attribute 'timestamp' with type int (idl: unsigned long long).

func (*Notification) Title Uses

func (_this *Notification) Title() string

Title returning attribute 'title' with type string (idl: DOMString).

func (*Notification) Vibrate Uses

func (_this *Notification) Vibrate() *javascript.FrozenArray

Vibrate returning attribute 'vibrate' with type javascript.FrozenArray (idl: FrozenArray).

type NotificationAction Uses

type NotificationAction struct {
    Action string
    Title  string
    Icon   string
}

dictionary: NotificationAction

func NotificationActionFromJS Uses

func NotificationActionFromJS(value js.Wrapper) *NotificationAction

NotificationActionFromJS is allocating a new NotificationAction object and copy all values from input javascript object

func (*NotificationAction) JSValue Uses

func (_this *NotificationAction) JSValue() js.Value

JSValue is allocating a new javasript object and copy all values

type Options Uses

type Options struct {
    Dir                Direction
    Lang               string
    Body               string
    Tag                string
    Image              string
    Icon               string
    Badge              string
    Timestamp          int
    Renotify           bool
    Silent             bool
    RequireInteraction bool
    Data               js.Value
    Actions            []*NotificationAction
}

dictionary: NotificationOptions

func OptionsFromJS Uses

func OptionsFromJS(value js.Wrapper) *Options

OptionsFromJS is allocating a new Options object and copy all values from input javascript object

func (*Options) JSValue Uses

func (_this *Options) JSValue() js.Value

JSValue is allocating a new javasript object and copy all values

type PermissionCallback Uses

type PermissionCallback js.Func

PermissionCallback is a javascript function type.

Call Release() when done to release resouces allocated to this type.

func PermissionCallbackToJS Uses

func PermissionCallbackToJS(callback PermissionCallbackFunc) *PermissionCallback

type PermissionCallbackFunc Uses

type PermissionCallbackFunc func(permission PermissionMode)

callback: NotificationPermissionCallback

func PermissionCallbackFromJS Uses

func PermissionCallbackFromJS(_value js.Value) PermissionCallbackFunc

type PermissionMode Uses

type PermissionMode int

enum: NotificationPermission

const (
    Default PermissionMode = iota
    Denied
    Granted
)

func Permission Uses

func Permission() PermissionMode

Permission returning attribute 'permission' with type PermissionMode (idl: NotificationPermission).

func PermissionModeFromJS Uses

func PermissionModeFromJS(value js.Value) PermissionMode

PermissionModeFromJS is converting a javascript value into a PermissionMode enum value.

func (*PermissionMode) JSValue Uses

func (this *PermissionMode) JSValue() js.Value

JSValue is converting this enum into a javascript object

func (PermissionMode) Value Uses

func (this PermissionMode) Value() string

Value is converting this into javascript defined string value

type PromisePermissionMode Uses

type PromisePermissionMode struct {
    // Value_JS holds a reference to a javascript value
    Value_JS js.Value
}

class: Promise

func PromisePermissionModeFromJS Uses

func PromisePermissionModeFromJS(value js.Wrapper) *PromisePermissionMode

PromisePermissionModeFromJS is casting a js.Wrapper into PromisePermissionMode.

func RequestPermission Uses

func RequestPermission(deprecatedCallback *PermissionCallback) (_result *PromisePermissionMode)

func (*PromisePermissionMode) Catch Uses

func (_this *PromisePermissionMode) Catch(onRejected *PromisePermissionModeOnRejected) (_result *PromisePermissionMode)

func (*PromisePermissionMode) Finally Uses

func (_this *PromisePermissionMode) Finally(onFinally *javascript.PromiseFinally) (_result *PromisePermissionMode)

func (*PromisePermissionMode) JSValue Uses

func (_this *PromisePermissionMode) JSValue() js.Value

func (*PromisePermissionMode) Then Uses

func (_this *PromisePermissionMode) Then(onFulfilled *PromisePermissionModeOnFulfilled, onRejected *PromisePermissionModeOnRejected) (_result *PromisePermissionMode)

type PromisePermissionModeOnFulfilled Uses

type PromisePermissionModeOnFulfilled js.Func

PromisePermissionModeOnFulfilled is a javascript function type.

Call Release() when done to release resouces allocated to this type.

func PromisePermissionModeOnFulfilledToJS Uses

func PromisePermissionModeOnFulfilledToJS(callback PromisePermissionModeOnFulfilledFunc) *PromisePermissionModeOnFulfilled

type PromisePermissionModeOnFulfilledFunc Uses

type PromisePermissionModeOnFulfilledFunc func(value PermissionMode)

callback: PromiseTemplateOnFulfilled

func PromisePermissionModeOnFulfilledFromJS Uses

func PromisePermissionModeOnFulfilledFromJS(_value js.Value) PromisePermissionModeOnFulfilledFunc

type PromisePermissionModeOnRejected Uses

type PromisePermissionModeOnRejected js.Func

PromisePermissionModeOnRejected is a javascript function type.

Call Release() when done to release resouces allocated to this type.

func PromisePermissionModeOnRejectedToJS Uses

func PromisePermissionModeOnRejectedToJS(callback PromisePermissionModeOnRejectedFunc) *PromisePermissionModeOnRejected

type PromisePermissionModeOnRejectedFunc Uses

type PromisePermissionModeOnRejectedFunc func(reason js.Value)

callback: PromiseTemplateOnRejected

func PromisePermissionModeOnRejectedFromJS Uses

func PromisePermissionModeOnRejectedFromJS(_value js.Value) PromisePermissionModeOnRejectedFunc

type Union Uses

type Union struct {
    Value js.Value
}

func UnionFromJS Uses

func UnionFromJS(value js.Value) *Union

func (*Union) JSValue Uses

func (u *Union) JSValue() js.Value

Package notification imports 3 packages (graph). Updated 2019-09-19. Refresh now. Tools for package owners.