public class Notification extends java.lang.Object implements EventTarget
| Modifier and Type | Class and Description |
|---|---|
static interface |
Notification.OnclickFn |
static interface |
Notification.OncloseFn |
static interface |
Notification.OndisplayFn |
static interface |
Notification.OnerrorFn |
static interface |
Notification.OnshowFn |
EventTarget.AddEventListenerOptionsUnionType, EventTarget.RemoveEventListenerOptionsUnionType| Modifier and Type | Field and Description |
|---|---|
java.lang.String |
body |
java.lang.String |
dir |
java.lang.String |
icon |
Notification.OnclickFn |
onclick |
Notification.OncloseFn |
onclose |
Notification.OndisplayFn |
ondisplay |
Notification.OnerrorFn |
onerror |
Notification.OnshowFn |
onshow |
static java.lang.String |
permission |
java.lang.String |
replaceId |
java.lang.String |
tag |
java.lang.String |
title |
| Constructor and Description |
|---|
Notification(java.lang.String title) |
Notification(java.lang.String title,
NotificationOptions options) |
| Modifier and Type | Method and Description |
|---|---|
void |
addEventListener(java.lang.String type,
EventListener listener) |
void |
addEventListener(java.lang.String type,
EventListener listener,
EventTarget.AddEventListenerOptionsUnionType options) |
void |
cancel() |
void |
close() |
boolean |
dispatchEvent(Event evt) |
void |
removeEventListener(java.lang.String type,
EventListener listener) |
void |
removeEventListener(java.lang.String type,
EventListener listener,
EventTarget.RemoveEventListenerOptionsUnionType options) |
static Promise<java.lang.String> |
requestPermission() |
static Promise<java.lang.String> |
requestPermission(NotificationPermissionCallback callback) |
void |
show() |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitaddEventListener, addEventListener, removeEventListener, removeEventListenerpublic static java.lang.String permission
public java.lang.String body
public java.lang.String dir
public java.lang.String icon
public Notification.OnclickFn onclick
public Notification.OncloseFn onclose
public Notification.OndisplayFn ondisplay
public Notification.OnerrorFn onerror
public Notification.OnshowFn onshow
public java.lang.String replaceId
public java.lang.String tag
public java.lang.String title
public Notification(java.lang.String title,
NotificationOptions options)
public Notification(java.lang.String title)
public static Promise<java.lang.String> requestPermission()
public static Promise<java.lang.String> requestPermission(NotificationPermissionCallback callback)
public void addEventListener(java.lang.String type,
EventListener listener,
EventTarget.AddEventListenerOptionsUnionType options)
addEventListener in interface EventTargetpublic void addEventListener(java.lang.String type,
EventListener listener)
addEventListener in interface EventTargetpublic void cancel()
public void close()
public boolean dispatchEvent(Event evt)
dispatchEvent in interface EventTargetpublic void removeEventListener(java.lang.String type,
EventListener listener,
EventTarget.RemoveEventListenerOptionsUnionType options)
removeEventListener in interface EventTargetpublic void removeEventListener(java.lang.String type,
EventListener listener)
removeEventListener in interface EventTargetpublic void show()