const eventDelegate = (parentSelector, targetSelector, eventName, fn) => {
console.log(parentSelector)
// const sb = document.body.querySelector('#haha')
console.log(document.ownerDocument)
// addEventListener(eventName, fn)
}
eventDelegate('#haha', 'li', 'click', function(){
console.log(this)
})
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<title>菜鸟教程(runoob.com)</title>
</head>
<body>
<ul id="haha">
<li>1</li>
<li>2<span>inner</span></li>
<li>3</li>
</ul>
</body>
</html>