How can I detect whether a website has a drag and drop file upload functionality? With above code, I am getting all of the event listeners and if see the related event listeners such as drop, drag. However, it only checks the current page of the web application.
For example,
I am not seeing drop event listener in the www.stackoverflow.com. However, https://stackoverflow.com/questions/ask has 'drop' event listener.
Array.from(document.querySelectorAll('*'))
.reduce(function(pre, dom){
var evtObj = getEventListeners(dom)
Object.keys(evtObj).forEach(function (evt) {
if (typeof pre[evt] === 'undefined') {
pre[evt] = 0
}
pre[evt] += evtObj[evt].length
})
return pre
}, {})
Is there any way to check the all of the event listeners accross different pages of the single web application?