diff --git a/lib/espruinotools.js b/lib/espruinotools.js index 7122112..4c0589c 100644 --- a/lib/espruinotools.js +++ b/lib/espruinotools.js @@ -6897,7 +6897,9 @@ while (d!==undefined) {console.log(btoa(d));d=f.read(${CHUNKSIZE});} * @param {string} options.id ID to ensure that subsequent calls with the same ID remember the last used directory. * @param {'text' | 'arraybuffer'} options.type (default 'text') Callback with either 'text' or 'arraybuffer' * @param {string | undefined} options.mimeType Optional comma-separated list of accepted mime types for files or extensions (eg. ".js,application/javascript") - * @param {(contents: ArrayBuffer | string, mimeType: string, fileName: string) => void} callback + * @param {(files: Array<{contents: (ArrayBuffer|string), mimeType: string, fileName: string}>) => void | undefined} options.onComplete + * Optional callback returns all files as an array of {contents, mimeType, fileName}. Called with `undefined` if the dialog is cancelled. + * @param {(contents: ArrayBuffer | string, mimeType: string, fileName: string) => void} callback Called for each file. Called with `undefined` if the dialog is cancelled. */ function fileOpenDialog(options, callback) { function readerLoaded(e,files,i,options,fileLoader) { @@ -6909,9 +6911,15 @@ while (d!==undefined) {console.log(btoa(d));d=f.read(${CHUNKSIZE});} result = ""; for (var j=0;j