ApoorvSaxena/lozad.js

holp it supports specifying observe container

Open

#69 opened on Oct 22, 2017

View on GitHub
 (4 comments) (1 reaction) (0 assignees)JavaScript (476 forks)batch import
Hacktoberfestenhancement

Repository metrics

Stars
 (7,370 stars)
PR merge metrics
 (No merged PRs in 30d)

Description

https://github.com/ApoorvSaxena/lozad.js/blob/65f9744a47261960b8a3ba9b73b0f6050fc91192/src/lozad.js#L47-L49

if the document can be replaced by a specified dom, it will be greater! Maybe like this:

observe( { container = document } ) { 
     const elements = container.querySelectorAll(selector) 
}

Contributor guide