Skip to content
This repository has been archived by the owner on Dec 11, 2023. It is now read-only.

Commit

Permalink
LazilyLoaderPlugin: Increase compatibility of native loading
Browse files Browse the repository at this point in the history
  • Loading branch information
nicross committed Jan 21, 2021
1 parent 1ee5700 commit 86b372c
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion dist/LazilyLoaderPlugin.min.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion js/LazilyLoaderPlugin.js
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@ const LazilyLoaderPlugin = (function IIFE(namespace) {
if ('loading' in element) {
if (!element.hasAttribute('loading')) {
element.setAttribute('loading', 'lazy')
handler(element, swapFromData)
setTimeout(function () {handler(element, swapFromData)})
}
return
}
Expand Down

0 comments on commit 86b372c

Please sign in to comment.