Unfortunately client side actions don’t return values.
If you want to share data between actions of plugin you have these options:
- use an element with a state and create an action from the element. In the action publish the value to the state. Now the value can be accessed from your element or from anything else outside of it.
- use an element and create two actions. The first one calcukate the value and save it in the
context
, the second action can read the value from thecontext
. The value is accessible only from actions of the same element instance. - use any kind of action (from an element or not) and save the value in the
window
object. The value is accessible from any code that runs on the page.
It’s not clear what do you mean by