lib/capybara/screenshot/diff/browser_helpers.rb in capybara-screenshot-diff-1.9.0 vs lib/capybara/screenshot/diff/browser_helpers.rb in capybara-screenshot-diff-1.9.2

- old
+ new

@@ -28,16 +28,16 @@ end end IMAGE_WAIT_SCRIPT = <<~JS function pending_image() { - var images = document.images; + const images = document.images for (var i = 0; i < images.length; i++) { - if (!images[i].complete) { - return images[i].src; + if (!images[i].complete && images[i].loading !== "lazy") { + return images[i].src } } - return false; + return false }(window) JS HIDE_CARET_SCRIPT = <<~JS if (!document.getElementById('csdHideCaretStyle')) {