mirror of
https://github.com/maximebf/php-debugbar.git
synced 2025-01-16 21:08:34 +01:00
fix cross-origin
iframe and no parent debugbar (#651)
* fix `cross-origin` iframe and no parent debugbar * fix iframe flag default value
This commit is contained in:
parent
20cffd75fe
commit
7705be9c2a
@ -425,7 +425,11 @@ if (typeof(PhpDebugBar) == 'undefined') {
|
|||||||
this.activeDatasetId = null;
|
this.activeDatasetId = null;
|
||||||
this.datesetTitleFormater = new DatasetTitleFormater(this);
|
this.datesetTitleFormater = new DatasetTitleFormater(this);
|
||||||
this.options.bodyMarginBottomHeight = parseInt($('body').css('margin-bottom'));
|
this.options.bodyMarginBottomHeight = parseInt($('body').css('margin-bottom'));
|
||||||
this.isIframe = window.self !== window.top;
|
try {
|
||||||
|
this.isIframe = window.self !== window.top && window.top.phpdebugbar;
|
||||||
|
} catch (error) {
|
||||||
|
this.isIframe = false;
|
||||||
|
}
|
||||||
this.registerResizeHandler();
|
this.registerResizeHandler();
|
||||||
},
|
},
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user