Interface WebNotification.WebNotificationJs
- All Superinterfaces:
Serializable
- Enclosing class:
WebNotification
What web notifications ask of their client-side bridge, as a JavaScript
definition for
Element.executeJs(Class).-
Method Summary
Modifier and TypeMethodDescriptionCloses the notification shown under the given key.closeByTag(String tag, String appId) Closes the notifications the given application has shown with the given tag.show(String title, WebNotificationOptions options, String key, ReturnChannelRegistration channel, String appId) Shows a notification, reporting clicks, closing and failures through the given channel.
-
Method Details
-
show
@JsExpression("window.Vaadin.Flow.webNotification.show($0, $1, (type, reason, message) => $3($2, type, reason, message), { key: $2, appId: $4 })") PendingJavaScriptResult show(String title, WebNotificationOptions options, String key, ReturnChannelRegistration channel, String appId) Shows a notification, reporting clicks, closing and failures through the given channel.- Parameters:
title- the title of the notificationoptions- what the notification shows besides its titlekey- whatclose(String)closes the notification bychannel- the channel the browser reports what happens to the notification through, preceded by the keyappId- the id of the application showing the notification, so thatcloseByTag(String, String)only closes the notifications of that application- Returns:
- the pending result, which completes once the notification is shown or has failed
-
close
@JsExpression("window.Vaadin.Flow.webNotification.close($0)") PendingJavaScriptResult close(String key) Closes the notification shown under the given key.- Parameters:
key- the key the notification was shown with- Returns:
- the pending result, which completes once the close is requested
-
closeByTag
@JsExpression("window.Vaadin.Flow.webNotification.closeByTag($0, $1)") PendingJavaScriptResult closeByTag(String tag, String appId) Closes the notifications the given application has shown with the given tag.- Parameters:
tag- the tag of the notifications to closeappId- the id of the application that showed the notifications- Returns:
- the pending result, which completes once the close is requested
-