mirror of
https://github.com/EGroupware/egroupware.git
synced 2025-01-03 12:39:25 +01:00
ignore SecurityError exception if opener is different security context / cross-origin
This commit is contained in:
parent
911e7d2955
commit
0092addd08
@ -86,11 +86,20 @@
|
|||||||
// check for a framework object
|
// check for a framework object
|
||||||
if (typeof window.framework == 'undefined')
|
if (typeof window.framework == 'undefined')
|
||||||
{
|
{
|
||||||
// try finding it in top or opener's top
|
try {
|
||||||
if (window.opener && typeof window.opener.top.framework != 'undefined')
|
// try finding it in top or opener's top
|
||||||
|
if (window.opener && typeof window.opener.top.framework != 'undefined')
|
||||||
|
{
|
||||||
|
window.framework = window.opener.top.framework;
|
||||||
|
if (debug) console.log('found framework object in opener top');
|
||||||
|
}
|
||||||
|
}
|
||||||
|
catch(e) {
|
||||||
|
// ignore SecurityError exception if opener is different security context / cross-origin
|
||||||
|
}
|
||||||
|
if (typeof window.framework != 'undefined')
|
||||||
{
|
{
|
||||||
window.framework = window.opener.top.framework;
|
// set in above try block
|
||||||
if (debug) console.log('found framework object in opener top');
|
|
||||||
}
|
}
|
||||||
else if (window.top && typeof window.top.framework != 'undefined')
|
else if (window.top && typeof window.top.framework != 'undefined')
|
||||||
{
|
{
|
||||||
|
Loading…
Reference in New Issue
Block a user