Is there a way to get list of events from element in content script?
1,766 views
Skip to first unread message
Alex Flores
unread,
Oct 8, 2021, 7:47:46 PM10/8/21
Reply to author
Sign in to reply to author
Forward
Sign in to forward
Delete
You do not have permission to delete messages in this group
Copy link
Report message
Show original message
Either email addresses are anonymous for this group or you need the view member email addresses permission to view the original message
to Chromium Extensions
Hello,
As the title says, I'm trying to get a list of events on a particular element in the content script. `getEventListeners(element)` is not a function in the content script.
Any help would be appreciated.
Thanks
wOxxOm
unread,
Oct 9, 2021, 10:56:44 AM10/9/21
Reply to author
Sign in to reply to author
Forward
Sign in to forward
Delete
You do not have permission to delete messages in this group
Copy link
Report message
Show original message
Either email addresses are anonymous for this group or you need the view member email addresses permission to view the original message
to Chromium Extensions, alex.f...@gmail.com
This function is provided only in devtools console. It's not available anywhere else.
run code in the page context (aka "main world") to read all onXXX properties of the element and override Event.target.addEventListener at document_start to accumulate the listeners in an internal array.