mirror of
https://github.com/EGroupware/egroupware.git
synced 2025-06-25 04:11:49 +02:00
ignore SecurityError exception if opener is different security context / cross-origin
This commit is contained in:
parent
271d7a869c
commit
911e7d2955
@ -49,6 +49,7 @@
|
|||||||
// check if egw object was injected by window open
|
// check if egw object was injected by window open
|
||||||
if (typeof window.egw == 'undefined')
|
if (typeof window.egw == 'undefined')
|
||||||
{
|
{
|
||||||
|
try {
|
||||||
// try finding it in top or opener's top
|
// try finding it in top or opener's top
|
||||||
if (window.opener && typeof window.opener.top.egw != 'undefined')
|
if (window.opener && typeof window.opener.top.egw != 'undefined')
|
||||||
{
|
{
|
||||||
@ -57,6 +58,14 @@
|
|||||||
popup = true;
|
popup = true;
|
||||||
if (debug) console.log('found egw object in opener');
|
if (debug) console.log('found egw object in opener');
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
catch(e) {
|
||||||
|
// ignore SecurityError exception if opener is different security context / cross-origin
|
||||||
|
}
|
||||||
|
if (typeof window.egw != 'undefined')
|
||||||
|
{
|
||||||
|
// set in above try block
|
||||||
|
}
|
||||||
else if (window.top && typeof window.top.egw != 'undefined')
|
else if (window.top && typeof window.top.egw != 'undefined')
|
||||||
{
|
{
|
||||||
window.egw = window.top.egw;
|
window.egw = window.top.egw;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user