https://github.com/ulivz/get-event-listeners
An event interceptor allowing you to get all the event listeners of an element
https://github.com/ulivz/get-event-listeners
Last synced: 6 months ago
JSON representation
An event interceptor allowing you to get all the event listeners of an element
- Host: GitHub
- URL: https://github.com/ulivz/get-event-listeners
- Owner: ulivz
- License: mit
- Created: 2018-11-22T15:40:45.000Z (almost 7 years ago)
- Default Branch: master
- Last Pushed: 2021-05-10T20:33:39.000Z (over 4 years ago)
- Last Synced: 2025-03-13T17:18:21.347Z (7 months ago)
- Language: JavaScript
- Size: 89.8 KB
- Stars: 2
- Watchers: 2
- Forks: 1
- Open Issues: 3
-
Metadata Files:
- Readme: README.md
- Changelog: CHANGELOG.md
- License: LICENSE
Awesome Lists containing this project
README
# @ulivz/get-event-listeners
[](https://npmjs.com/package/@ulivz/get-event-listeners) [](https://npmjs.com/package/@ulivz/get-event-listeners)
## Usage
In order to capture all the events, you need to introduce this script in the head of your HTML:
- From CDN:
```html
```
- From local file:
```html
<script src="./get-event-listeners.min.js">
```## API
### getEventListeners(HTMLElement)
Get event listenrs of a particular element
### getAllEventListeners()
Get event listenrs of all elements
## Contributing
1. Fork it!
2. Create your feature branch: `git checkout -b my-new-feature`
3. Commit your changes: `git commit -am 'Add some feature'`
4. Push to the branch: `git push origin my-new-feature`
5. Submit a pull request :D## Author
**@ulivz/get-event-listeners** © [ULIVZ](https://github.com/ulivz), Released under the [MIT](./LICENSE) License.<br>
Authored and maintained by ULIVZ with help from contributors ([list](https://github.com/ulivz/get-event-listeners/contributors)).> [github.com/ulivz](https://github.com/ulivz) · GitHub [@ULIVZ](https://github.com/ulivz) · Twitter [@_ulivz](https://twitter.com/_ulivz)