📜  查找导致垂直溢出的元素 - Javascript 代码示例

📅  最后修改于: 2022-03-11 15:03:15.498000             🧑  作者: Mango

代码示例1
// Paste the below in the console and scroll. It will log the culprit in the console.

function findScroller(element) {
    element.onscroll = function() { console.log(element)}

    Array.from(element.children).forEach(findScroller);
}

findScroller(document.body);