Web Actions
Introduction
The Web Actions module contains the following actions:
Category | Action |
---|---|
Focus next | Moves the keyboard focus to the next element that can be focused. |
Focus previous | Moves the keyboard focus to the previous element that can be focused. |
Scroll to | Scrolls the window to make a targeted element visible. For this action, you need to provide a target selector. This target could be an element containing a class (for example, .mx-class-name , .my-class-name ), an HTML element (for example, td , div , a ), or an element ID (for example, #my-element-id ). |
Set focus | Sets the focus to the element found with the selector. The element should be able to hold focus like a link, button, or input. For this action, you need to provide a target selector. This target could be an element containing a class (for example, .mx-class-name , .my-class-name ), an HTML element (for example, td , div , a ), or an element ID (for example, #my-element-id ). |
Take picture | Allows users to take a picture from the back and front camera in a web or PWA app. |
Usage
To take a picture, follow these steps:
-
To use the Take picture action, create an entity that extends the System.Image entity:
-
Drag the Take picture action from the Studio Pro toolbar into your nanoflow like in the example below. For that you need to pass an object for the action:
-
Double-click the Take picture action and select which object you pass to the action to fill with the image properties:
-
If needed, configure an option which shows a confirmation screen allowing users to accept or retake the picture:
-
After the execution, check if the picture was taken or not. The value returned from the action is a Boolean:
Strict CSP Compatibility
This module is not yet fully compliant with strict content security policy (CSP). If the Take picture action is used with strict CSP, it will result in visual defects.