Class Notification
java.lang.Object
elemental2.dom.Notification
- All Implemented Interfaces:
EventTarget
@JsType(isNative=true,
namespace="<global>")
public class Notification
extends Object
implements EventTarget
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic interface
static interface
static interface
static interface
static interface
Nested classes/interfaces inherited from interface elemental2.dom.EventTarget
EventTarget.AddEventListenerListenerFn, EventTarget.AddEventListenerOptionsUnionType, EventTarget.RemoveEventListenerListenerFn, EventTarget.RemoveEventListenerOptionsUnionType
-
Field Summary
Fields -
Constructor Summary
ConstructorsConstructorDescriptionNotification
(String title) Notification
(String title, NotificationOptions options) -
Method Summary
Modifier and TypeMethodDescriptionvoid
addEventListener
(String type, EventListener listener) void
addEventListener
(String type, EventListener listener, EventTarget.AddEventListenerOptionsUnionType options) void
cancel()
void
close()
boolean
dispatchEvent
(Event evt) void
removeEventListener
(String type, EventListener listener) void
removeEventListener
(String type, EventListener listener, EventTarget.RemoveEventListenerOptionsUnionType options) static elemental2.promise.Promise
<String> static elemental2.promise.Promise
<String> void
show()
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Methods inherited from interface elemental2.dom.EventTarget
addEventListener, addEventListener, removeEventListener, removeEventListener
-
Field Details
-
permission
-
body
-
data
-
dir
Deprecated. -
icon
-
onclick
-
onclose
-
ondisplay
Deprecated. -
onerror
-
onshow
-
replaceId
Deprecated. -
tag
-
title
-
-
Constructor Details
-
Notification
-
Notification
-
-
Method Details
-
requestPermission
-
requestPermission
public static elemental2.promise.Promise<String> requestPermission(NotificationPermissionCallback callback) -
addEventListener
public void addEventListener(String type, EventListener listener, EventTarget.AddEventListenerOptionsUnionType options) - Specified by:
addEventListener
in interfaceEventTarget
-
addEventListener
- Specified by:
addEventListener
in interfaceEventTarget
-
cancel
public void cancel() -
close
public void close() -
dispatchEvent
- Specified by:
dispatchEvent
in interfaceEventTarget
-
removeEventListener
public void removeEventListener(String type, EventListener listener, EventTarget.RemoveEventListenerOptionsUnionType options) - Specified by:
removeEventListener
in interfaceEventTarget
-
removeEventListener
- Specified by:
removeEventListener
in interfaceEventTarget
-
show
public void show()
-