13.02.2025, 08:55
Add an Additional class (my-element) to the element then add this to Custom JavaScript.
In .lp document which includes the visualization via iframe use this code to get the message:
Code:
$(function(){
$('.my-element').click(function() {
var data = this.dataset;
var message = {
object: data.object,
objectName: data.objectName,
}
window.parent.postMessage(message);
});
});
In .lp document which includes the visualization via iframe use this code to get the message:
Code:
window.addEventListener('message', function(event) {
console.log('event data', event.data)
}, false);