SOURCE

console 命令行工具 X clear

                    
>
console
var io = new IntersectionObserver(entries => {
  entries.forEach(entry => {
    var node = entry.target;
    var cp = node.cloneNode();
    
    var src = node.getAttribute('data-src');
    node.setAttribute('src', src);
    io.unobserve(node);
    
    var body = document.querySelector('body');
    body.appendChild(cp);
    io.observe(cp);
  });
}, {
	threshold: 0.1
});

Array.from(document.querySelectorAll('img')).forEach(img => {
  io.observe(img);
});
<img data-src="https://encrypted-tbn2.gstatic.com/images?q=tbn:ANd9GcSMFynE3clrgzCU2ZDw9SDn5gM2JuwEsCE37Qf4S6uBlJljejEYWg" alt="" />
img {
  background-color: #fff;
  width: 300px;
  height: 300px;
}

body {
  height: 900px;
}