An open API service indexing awesome lists of open source software.

https://github.com/dieterholvoet/event-propagation-path

Polyfill for the JavaScript Event path/composedPath property
https://github.com/dieterholvoet/event-propagation-path

javascript polyfill

Last synced: 2 months ago
JSON representation

Polyfill for the JavaScript Event path/composedPath property

Awesome Lists containing this project

README

        

# event-propagation-path
Polyfill for the JavaScript Event path/composedPath property ([related Stack Overflow thread](http://stackoverflow.com/a/39245638/2637528))

## 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;
};);
```