JSFiddle - React, Tailwind, and code Playground

by Salmin Skenderovic

JavaScript

let fileHandle;
const button = document.querySelector("#button");
console.log(button)
button.addEventListener('click', async () => {
  // Destructure the one-element array.
  [fileHandle] = await window.showOpenFilePicker();
  // Do something with the file handle.
});