Add postMessage API for embedded apps