Discussions
Iframe Integration
about 3 years ago by Gerhard
Hi there,
since a couple of days the code for the iframe integration seems to be buggy.
I use:
<script>
window.addEventListener('message', function(e) {
var iframe = document.querySelector('#personio-iframe');
var eventName = e.data[0];
var data = e.data[1];
switch(eventName) {
case 'setHeight':
iframe.style.height = data + 'px';
break;
}
}, false);
</script>
If I remove the ID which leads to the script it works. But by using the id nothing is shown!
Can anybody provide a solution?
Thanks