function addEvent(el, event, callback, isCapture = false) {
if (!el || !event || !...(child, 'click', function (e) {
console.log('child');
});
addEvent(parent, 'click',...function (e) {
console.log('parent');
});
addEvent(grandparent, 'click', function (e)...('document');
});
addEvent('html', 'click', function (e) {
console.log('html');
})...(child, 'click', function (e) {
console.log('child');
}, true);
addEvent(parent, 'click