Lit JS - Issue with event.target in document.addEventListener

50 Views Asked by At

If i am using document listener anywhere in Lit Js and try to console event.target then it is printing only current element object instead of element which user has clicked.

connectedCallback() {
    document.addEventListener('click', (event) => {
       console.log(event.target);
    });
}

How to achieve this functionality in Lit? Is it a defect?

0

There are 0 best solutions below