NOtherDev / whatwebcando

An overview of the device integration HTML5 APIs
https://whatwebcando.today/
MIT License
836 stars 61 forks source link

Native File System API exeption #67

Closed SuperPat45 closed 4 years ago

SuperPat45 commented 4 years ago

The Latest chrome throw an exception clicking button "Choose file to create or overwrite (Native File System API)" :

VM33:38 Uncaught (in promise) TypeError: Failed to execute 'chooseFileSystemEntries' on 'Window': The provided value 'saveFile' is not a valid enum value of type ChooseFileSystemEntriesType. at writeFile (:38:31) at HTMLButtonElement.onclick (files.html:1)

It seems that the old trial value :

  const handle = await window.chooseFileSystemEntries({
    type: 'saveFile',
  });

should be changed to:

  const handle = await window.chooseFileSystemEntries({
    type: 'save-file',
  });
NOtherDev commented 4 years ago

Fixed by #68.