Skip to content

Commit

Permalink
Limit bridge.js injection to top navigation only
Browse files Browse the repository at this point in the history
Effectively, act as if the bridge.js were injected
in the top frame only, despite Puppeteer injecting
it into any Document context (including iframes).

Fixes #202.
  • Loading branch information
mattyrob committed Jul 2, 2023
1 parent 240436f commit e2f7104
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions chrome/bridge.js
Expand Up @@ -8,6 +8,10 @@

/* global QUnit:true */
(function (factory) {
if (window.self !== window.top) {
// Ignore iframes. https://github.com/gruntjs/grunt-contrib-qunit/issues/202
return;
}
if (typeof define === 'function' && define.amd) {
require(['qunit'], factory);
} else {
Expand Down

0 comments on commit e2f7104

Please sign in to comment.