Event Listeners list

Adds a method to elements to get their event listeners

Tác giả
tumnegg
Cài đặt hàng ngày
0
Số lần cài đặt
22
Đánh giá
0 0 0
Phiên bản
1.0.1
Đã tạo
30-01-2020
Đã cập nhật
02-04-2020
Kích thước
1 KB
Giấy phép
MIT
Áp dụng cho
Tất cả trang web

Adds a listEventListeners method to every element that returns an array containing every event added to that listener.

A quick example:

const el = document.getElementById("my-test-element");
el.addEventListener("click", doSomething);
el.listEventListeners(); // returns {"click":[doSomething]}
el.listEventListeners("click"); // returns [doSomething]