Safe wrapper for dynatrace.userActions.current which returns undefined if RUM JavaScript or the user actions module is not available.
The current user action, or undefined if no user action is in progress or the user actions module is not enabled.
undefined
import * as userActions from "@dynatrace/rum-javascript-sdk/api/user-actions";const currentAction = userActions.getCurrent();if (currentAction) { currentAction.completeAutomatically = false;} Copy
import * as userActions from "@dynatrace/rum-javascript-sdk/api/user-actions";const currentAction = userActions.getCurrent();if (currentAction) { currentAction.completeAutomatically = false;}
Safe wrapper for dynatrace.userActions.current which returns undefined if RUM JavaScript or the user actions module is not available.