I am just trying to pass a FileList Object to a function which I use with chrome.tabs.executeScript function. I think I am having formatting issues. Can anyone help please?
popup.html
<input type="file" id="uploader">
<script src="popup.js"></script>
popup.js
document.getElementById('uploader').onchange = () => {
var files = document.getElementById('uploader').files
chrome.tabs.executeScript( { code: "console.log(files)" } );
}
I just want to pass files to console.log function as an Object. Because I will use the file in it.
Thanks.