Skip to content

Commit

Permalink
fix cross-origin iframe and no parent debugbar
Browse files Browse the repository at this point in the history
  • Loading branch information
erikn69 authored Apr 12, 2024
1 parent cd46685 commit 8f7c381
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion src/DebugBar/Resources/debugbar.js
Original file line number Diff line number Diff line change
Expand Up @@ -425,7 +425,9 @@ 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.registerResizeHandler();
},

Expand Down

0 comments on commit 8f7c381

Please sign in to comment.