Appearance
Studio Script Reference: Function scope
The following properties are only available in Function scripts.
context.triggerContext
Whenever a function script is being called by a trigger/action combo in the Studio inspector, this property identifies which trigger that's responsible for calling the action.
INFO
triggerContext is only available when the function has been triggered by a trigger action, and not if you've manually called the function by code.
Type: object
Example:
A click trigger in the inspector has a Call a function action assigned to it.
js
{
click: [
{
id: "ae4a2e8b-1162-4d41-b8ed-55d54d4a8ccd",
data: {
"params": {},
"function": "5cdb9fce-2c79-4eaa-beb9-e1c1762a4a59"
},
action: "callFunction",
parent: "2b6a7667-0249-47f2-8fe2-af94b4b58762",
include: [],
trigger: "click",
dataOverrides: {}
}
]
}