You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
@@ -226,7 +234,7 @@ export async function DumpDataAsync(
226
234
* @param data the data array
227
235
* @param successCallback defines the callback triggered once the data are available
228
236
* @param mimeType defines the mime type of the result
229
-
* @param fileName defines the filename to download. If present, the result will automatically be downloaded
237
+
* @param fileName The name of the file to download. If present, the result will automatically be downloaded. If not defined, and `successCallback` is also not defined, the result will automatically be downloaded with an auto-generated file name.
230
238
* @param invertY true to invert the picture in the Y dimension
231
239
* @param toArrayBuffer true to convert the data to an ArrayBuffer (encoded as `mimeType`) instead of a base64 string
232
240
* @param quality The quality of the image if lossy mimeType is used (e.g. image/jpeg, image/webp). See {@link https://developer.mozilla.org/en-US/docs/Web/API/HTMLCanvasElement/toBlob | HTMLCanvasElement.toBlob()}'s `quality` parameter.
@@ -242,6 +250,11 @@ export function DumpData(
242
250
toArrayBuffer=false,
243
251
quality?: number
244
252
): void{
253
+
// For back-compat: if no fileName and no callback, force download the result
0 commit comments