DefinitelyTyped

Index

Variables

Modules

Variables

Notify: { needsPermission(): boolean; requestPermission(onPermissionGrantedCallback?: () => any, onPermissionDeniedCallback?: () => any): void; isSupported(): boolean; new(title: string, options?: notify.INotifyOption): notify.INotify; }

constructor(): INotify

Returns

INotify

public isSupported(): boolean

return true if the browser supports HTML5 Notification

Returns

boolean

public needsPermission(): boolean

Check is permission is needed for the user to receive notifications.

Returns

boolean

true : needs permission, false : does not need

public requestPermission()

Asks the user for permission to display notifications

optional .onPermissionDeniedCallback.onPermissionDeniedCallback?: () => any

optional .onPermissionGrantedCallback.onPermissionGrantedCallback?: () => any