Skip to content

Commit

Permalink
We only wait for <iframe> elements with a [src] attribute
Browse files Browse the repository at this point in the history
  • Loading branch information
triskweline committed Jun 21, 2024
1 parent 5281165 commit 2ec2a86
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
3 changes: 2 additions & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,8 @@ This project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0.html

# Unreleased

- We no longer wait for `<script>` elements that do not load JavaScript
- We now only wait for `<script>` elements with a JavaScript type
- We only wait for `<iframe>` elements with a `[src]` attribute


# 2.2.1
Expand Down
2 changes: 1 addition & 1 deletion lib/capybara-lockstep/helper.js
Original file line number Diff line number Diff line change
Expand Up @@ -188,7 +188,7 @@ window.CapybaraLockstep = (function() {
}

function isTrackableIFrame(element) {
return element.matches('iframe') &&
return element.matches('iframe[src]') &&
!hasDataSource(element) &&
element.getAttribute('loading') !== 'lazy'
}
Expand Down

0 comments on commit 2ec2a86

Please sign in to comment.