In Edge extension I want to get all upload file name.Here is my code:
document.addEventListener('click', (event) => {
const element = event.srcElement;
const elementName = element.localName;
if (elementName === 'input') {
if (element.getAttribute('type') === 'file') {
element.onchange = function (e) {
console.log(e.target.value);
}
}
}
});
But, this console.log is :
{"notifyType":"consoleItemLog","message":{"message":"","styles":"","hasFormatString":true,"targetId":"uid36","fileUrl":"js/contentscript.js","lineNumber":49,"columnNumber":17}}
I do not know how to get upload file name? And when I console.log(e), the onchange is permission denied.
thank you very much!