Your code can't be correctly executed, you have syntax error in this line:
if(event.origin !== 'http://www.examplemsg.com';) return;
In destination.html you have syntax problem also: Take a look:
<body>
<head>
<title>Receiving end</title>
</head>
<script>
Remove extra semicolon, format your html documents as expected, try again and your example will work as expected