Hi there,
We're working through a WebSDK migration at the moment and I have a question about 'this' scope in Update Variables
In old AA:
If I have a rule that fires on clicking something, in AA Update Variables Custom Code the 'this' object references the clicked HTML element.
In WebSDK:
Same rule, WebSDK Update Variables Custom Code, the 'this' now is the entire window object.
Does anyone have a way to get the clicked HTML element that fired the rule?
Side question is there any documentation around which javascript objects/function/etc the Web SDK Ext has access to?
Thanks!
Topics help categorize Community content and increase your ability to discover relevant content.
Update:
After some research, we can access the clicked element with the 'event' object. For reference the 'event' object is part of the Core Extension and is populated in every rule.
a console.log(event) outputs something like the below screenshot
@PaulBr15 Did you find the suggestion helpful? Please let us know if you require more information. Otherwise, please mark the answer as correct for posterity. If you've discovered a solution yourself, we would appreciate it if you could share it with the community. Thank you!
Views
Replies
Total Likes
Views
Likes
Replies