added postMessage to go around cross-domain restriction.