Skip to content

Commit

Permalink
simplify code
Browse files Browse the repository at this point in the history
  • Loading branch information
jmartsch committed Mar 2, 2021
1 parent 924a3b3 commit c864d4f
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 1 deletion.
1 change: 1 addition & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -146,6 +146,7 @@ Use these attributes on your HTML element like this:
| data-initinview | boolean: true | Set this to true if you want the resource to execute (for example video to play) when the element is in view.

## Changelog
* v2.0 use IntersectionObserver instead of scroll listener, for better performance.
* v1.1.901 betterify example page
* v1.1.9 remove gulp and rollup and use webpack instead
* use Babel 7
Expand Down
2 changes: 1 addition & 1 deletion src/lazyframe.js
Original file line number Diff line number Diff line change
Expand Up @@ -100,7 +100,7 @@ const Lazyframe = () => {

function loop(el) {

if (el instanceof HTMLElement === false ||
if (!(el instanceof HTMLElement) ||
el.classList.contains('lazyframe--loaded')) return;

const lazyframe = {
Expand Down

0 comments on commit c864d4f

Please sign in to comment.