src/render/browser/base/component/lazyload.js
function loadIfNeeded (elementScope) {
  const notPreProcessed = elementScope.querySelectorAll('[img-src]')
  // image elements which have attribute 'i-lazy-src' were elements
  // that had been preprocessed by lib-img-core, but not loaded yet, and
  // must be loaded when 'appear' events were fired. It turns out the
  // 'appear' event was not fired correctly in the css-translate-transition
  // situation, so 'i-lazy-src' must be checked and lazyload must be
  // fired manually.
  const preProcessed = elementScope.querySelectorAll('[i-lazy-src]')
  if (notPreProcessed.length > 0 || preProcessed.length > 0) {
    fire()
  }
}
function loadIfNeeded (elementScope) {
  const notPreProcessed = elementScope.querySelectorAll('[img-src]')
  // image elements which have attribute 'i-lazy-src' were elements
  // that had been preprocessed by lib-img-core, but not loaded yet, and
  // must be loaded when 'appear' events were fired. It turns out the
  // 'appear' event was not fired correctly in the css-translate-transition
  // situation, so 'i-lazy-src' must be checked and lazyload must be
  // fired manually.
  const preProcessed = elementScope.querySelectorAll('[i-lazy-src]')
  if (notPreProcessed.length > 0 || preProcessed.length > 0) {
    fire()
  }
}
function loadIfNeeded ( elementScope ) { const notPreProcessed = elementScope . querySelectorAll ( '[img-src]' ) // image elements which have attribute 'i-lazy-src' were elements // that had been preprocessed by lib-img-core, but not loaded yet, and // must be loaded when 'appear' events were fired. It turns out the // 'appear' event was not fired correctly in the css-translate-transition // situation, so 'i-lazy-src' must be checked and lazyload must be // fired manually. const preProcessed = elementScope . querySelectorAll ( '[i-lazy-src]' ) if ( notPreProcessed . length > 0 || preProcessed . length > 0 ) { fire ( ) } }
for a scope of element, not for a image.
for a scope of element not for a image .