If you wrap this in `window.addEventListener('message', function() { here is the code })`, I believe this will be called after the app code that listens to message too.