I am loading an iFrame of a different domain. Both the parent and the iFrame sites are under my control. I\'m using iFrame.postMessage to post messages to the iFrame. The si
This will give you the cookie of the iframe:
var cookie = document.getElementById("iframeId").contentDocument.cookie;
To get a cookie by name use this function (from stackoverflow):
function getCookie(cookie, name) {
function escape(s) { return s.replace(/([.*+?\^${}()|\[\]\/\\])/g, '\\$1'); };
var match = cookie.match(RegExp('(?:^|;\\s*)' + escape(name) + '=([^;]*)'));
return match ? match[1] : null;
}