import inputData from './data.js';
import infiniteDivs from '../../lib/infinitedivs.js';

let rootElement = document.body;

function divGenerator(item) {
  let div = document.createElement('div'),
    img = document.createElement('img'),
    span = document.createElement('span');

  img.src = item.img;
  img.style = 'vertical-align: middle; height: 50px; width: 50px; margin: 20px';
  img.alt = 'avatar';
  span.innerText = item.name;
  span.setAttribute('style', 'text-decoration: underline');
  div.appendChild(img);
  div.appendChild(span);
  return div;
}

let dataArray = inputData;

let config = {
  bufferMultiplier: 2,
  dataArray,
  divGenerator,
  divHeight: 90,
  rootElement
};

let infinitedivs = new infiniteDivs(config);

function scrollListener() {
  infinitedivs.viewDoctor();
};
document.addEventListener('scroll', scrollListener);

@@ -286,12 +286,26 @@
 mg.s
-rc =
+etAttribute('src',
  ite
@@ -309,24 +309,25 @@
 item.img
+)
 ;%0A  img.
 style = 
@@ -322,15 +322,29 @@
 img.
+setAttribute('
 style
- =
+',
  've
@@ -405,24 +405,25 @@
 n: 20px'
+)
 ;%0A  img.
 alt = 'a
@@ -418,13 +418,27 @@
 img.
+setAttribute('
 alt
- =
+',
  'av
@@ -442,16 +442,17 @@
 'avatar'
+)
 ;%0A  span
@@ -456,16 +456,18 @@
 pan.
-innerTex
+textConten
 t = 

Use standard methods in div creation. Fix for firefox and safari.