new postMessage API based on w3c spec, updated the example project to use postMessage API