Thanks for your hint. Locally I can run my app and have it communicate with a parent div now. But when I deploy the app on shinyapp.io the messages get discarded from the buffer. 
Is there a setting I can change so that the messages are not discarded but send to the parent div also when the app is hosted on shinyapp_io?
Here is a link to my minimal demo app on shinyapp_io:
https://f1-htw-berlin.shinyapps.io/shinymoodlequiz_v2
The custom JS code used is:
$(document).ready(function() {
$(document).on('shiny:inputchanged', function(event) {
// console.log("Something changed. Value now is "+event.value);
// console.log("Change happened at "+event.name);
var wertepaar = [event.name, event.value]
parent.postMessage(wertepaar, "*");
});
});