If you’re working with the new window.postMessage functionality in HTML5 and get this JavaScript error:
An invalid or illegal string was specified" code: "12
Make sure you specify a full URL in window.postMessage like so:
parent.postMessage('hi there!', 'http://www.ryandoherty.net');
If you use a URL like: ‘ryandoherty.net’ you’ll get a very obtuse and unintelligible error message. I searched the internet for about 20 minutes to no avail. The error message apparently pops up for a number of other reasons. I’m posting this to hopefully help other people out!