View Full Version : postMessage and targetOrigin

10-06-2011, 08:01 PM
Is it possible to specify more than one targetOrigin url, if using postMessage with an iframe?

I know I can specify one url:

otherWindow.postMessage(message, 'http:example.com');

or unlimited url's with an *:

otherWindow.postMessage(message, '*');

But is what if you wanted to specify 2 or 3 url's? Is that doable?

rnd me
10-06-2011, 10:35 PM
no, use a star. the bigger security concern is sniffing out incoming messages in the event handler...