event-propagation-path
v1.0.5
Published
Polyfill for the JavaScript Event path/composedPath property
Downloads
3,939
Maintainers
Readme
event-propagation-path
Polyfill for the JavaScript Event path/composedPath property (related Stack Overflow thread)
Usage
Call the propagationPath
method on any Event object.
Example
window.addEventListener('click', (event) => {
if (!event.propagationPath().includes(this.container)) {
this.container.classList.remove('expanded');
}
return false;
};);