{"ScriptPreparationCode":"var node = document.getElementById(\u0027wrapper\u0027), els = []\r\n\r\nfor(var i = 0; i \u003C 30; i\u002B\u002B) {\r\n var el = document.createElement(\u0027div\u0027); el.innerText = \u0027hi world\u0027; el.style[\u0027padding-bottom\u0027] = \u0027175px\u0027; node.appendChild(el);\r\n els.push({el: el});\r\n};\r\n\r\n","TestCases":[{"Name":"one interactionObservers on many elements ","Code":"document.getElementById(\u0027wrapper\u0027).firstChild.scrollIntoView();var interfn = function(entries){\r\n var rel;\r\n entries.forEach(entry =\u003E { \r\n els.forEach(function(eln){\r\n if(eln == entry.target) {\r\n rel = entry.target\r\n }\r\n })\r\n })\r\n rel.innerText = \u0027hey world\u0027;\r\n};\r\n\r\n\r\nvar inter = new IntersectionObserver(interfn, { root: null, threshold: 0});\r\n\r\ndocument.querySelectorAll(\u0027#wrapper \u003E div\u0027).forEach(function(el){\r\n inter.observe(el);\r\n})\r\n\r\nvar node = document.getElementById(\u0027wrapper\u0027);\r\nnode.lastChild.scrollIntoView({behavior: \u0027smooth\u0027})","IsDeferred":false},{"Name":"one intersectionObserver per one element","Code":"document.getElementById(\u0027wrapper\u0027).firstChild.scrollIntoView(); document.querySelectorAll(\u0027#wrapper \u003E div\u0027).forEach(function(el){\r\n var interfn = function(entry){console.log(entry[0])};\r\n var inter = new IntersectionObserver(interfn, { root: null, threshold: 0});\r\n inter.observe(el);\r\n})\r\n\r\n\r\nvar node = document.getElementById(\u0027wrapper\u0027);\r\nnode.lastChild.scrollIntoView({behavior: \u0027smooth\u0027});","IsDeferred":false}]}