Skip to content

Commit

Permalink
Remove loading attribute before invoking location.replace()
Browse files Browse the repository at this point in the history
  • Loading branch information
zcorpan committed Mar 20, 2024
1 parent 1523a4f commit 1c4fd4e
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions src/lazysizes-core.js
Original file line number Diff line number Diff line change
Expand Up @@ -481,6 +481,7 @@ function l(window, document, Date) { // Pass in the window Date function also fo

// loadMode can be also a string!
if (loadMode == 0) {
elem.removeAttribute('loading'); // Avoid the browser lazy-loading `src` after the below navigation.
elem.contentWindow.location.replace(src);
} else if (loadMode == 1) {
elem.src = src;
Expand Down

0 comments on commit 1c4fd4e

Please sign in to comment.