I need to execute javascript code on button clicked (window.postMessage). What is the right way? Thanks