Class RequestWebNotificationPermissionAction
java.lang.Object
com.vaadin.flow.component.trigger.internal.Action
com.vaadin.flow.component.trigger.internal.RequestWebNotificationPermissionAction
- All Implemented Interfaces:
Serializable
Asks the browser for permission to show notifications when the bound trigger
fires.
Browsers only show the permission prompt during a user gesture (a click, a
key press, …), so bind this action to a Trigger that fires during
such a gesture, typically a ClickTrigger. The outcome is not reported
through this action: the client publishes the new permission to the UI's
permission signal, which also covers changes made outside the prompt.
For internal use only. May be renamed or removed in a future release.
- See Also:
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic interfaceHow notification permission is requested, as snippets forJsSnippets.of(Class).Nested classes/interfaces inherited from class com.vaadin.flow.component.trigger.internal.Action
Action.Input<T> -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected JsFunctionBuilds theJsFunctionthat runs this action when the surrounding trigger fires.Methods inherited from class com.vaadin.flow.component.trigger.internal.Action
warnIfNotVisible
-
Constructor Details
-
RequestWebNotificationPermissionAction
public RequestWebNotificationPermissionAction()
-
-
Method Details
-
toJs
Description copied from class:ActionBuilds theJsFunctionthat runs this action when the surrounding trigger fires. The returned function takes one runtime argument namedevent(declared by the framework when it composes the trigger handler); subclasses do not declare argument names themselves.The body is one statement. To embed a value produced on the client, capture an
Action.Input'sJsFunctionas a capture and invoke it inside the body as$N(event).
-