Merge pull request #891 from nilspreusker/ie9-compatibility
IE9 Compatibility
This commit is contained in:
commit
ee62f5b1a1
2 changed files with 7 additions and 6 deletions
|
@ -619,7 +619,7 @@
|
|||
if (event.origin !== loginIframe.iframeOrigin) {
|
||||
return;
|
||||
}
|
||||
var data = event.data;
|
||||
var data = JSON.parse(event.data);
|
||||
var promise = loginIframe.callbackMap[data.callbackId];
|
||||
delete loginIframe.callbackMap[data.callbackId];
|
||||
|
||||
|
@ -652,7 +652,7 @@
|
|||
msg.callbackId = createCallbackId();
|
||||
loginIframe.callbackMap[msg.callbackId] = promise;
|
||||
var origin = loginIframe.iframeOrigin;
|
||||
loginIframe.iframe.contentWindow.postMessage(msg, origin);
|
||||
loginIframe.iframe.contentWindow.postMessage(JSON.stringify(msg), origin);
|
||||
} else {
|
||||
promise.setSuccess();
|
||||
}
|
||||
|
|
|
@ -17,14 +17,15 @@
|
|||
return;
|
||||
|
||||
}
|
||||
event.data.loggedIn = false;
|
||||
var data = JSON.parse(event.data);
|
||||
data.loggedIn = false;
|
||||
var cookie = getCookie('KEYCLOAK_SESSION');
|
||||
if (cookie) {
|
||||
event.data.loggedIn = true;
|
||||
event.data.session = cookie;
|
||||
data.loggedIn = true;
|
||||
data.session = cookie;
|
||||
}
|
||||
|
||||
event.source.postMessage(event.data,
|
||||
event.source.postMessage(JSON.stringify(data),
|
||||
event.origin);
|
||||
}
|
||||
window.addEventListener("message", receiveMessage, false);
|
||||
|
|
Loading…
Reference in a new issue