1
0
mirror of https://github.com/maximebf/php-debugbar.git synced 2025-01-16 13:00:42 +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:
erikn69 2024-05-13 08:42:06 -05:00 committed by GitHub
parent 20cffd75fe
commit 7705be9c2a
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -425,7 +425,11 @@ if (typeof(PhpDebugBar) == 'undefined') {
this.activeDatasetId = null;
this.datesetTitleFormater = new DatasetTitleFormater(this);
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();
},