Skip to content

Commit

Permalink
Use File[] instead of FileList, improve load doc
Browse files Browse the repository at this point in the history
  • Loading branch information
ivmartel committed Aug 17, 2023
1 parent 9fa6560 commit ad6397d
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 7 deletions.
4 changes: 2 additions & 2 deletions src/app/application.js
Original file line number Diff line number Diff line change
Expand Up @@ -495,7 +495,7 @@ export class App {
/**
* Load a list of files. Can be image files or a state file.
*
* @param {FileList} files The list of files to load.
* @param {File[]} files The list of files to load.
* @fires App#loadstart
* @fires App#loadprogress
* @fires App#loaditem
Expand All @@ -514,7 +514,7 @@ export class App {
/**
* Load a list of URLs. Can be image files or a state file.
*
* @param {Array} urls The list of urls to load.
* @param {string[]} urls The list of urls to load.
* @param {object} [options] The options object, can contain:
* - requestHeaders: an array of {name, value} to use as request headers
* - withCredentials: boolean xhr.withCredentials flag to pass to the request
Expand Down
10 changes: 5 additions & 5 deletions src/app/loadController.js
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ export class LoadController {
/**
* Load a list of files. Can be image files or a state file.
*
* @param {FileList} files The list of files to load.
* @param {File[]} files The list of files to load.
*/
loadFiles(files) {
// has been checked for emptiness.
Expand All @@ -63,7 +63,7 @@ export class LoadController {
/**
* Load a list of URLs. Can be image files or a state file.
*
* @param {Array} urls The list of urls to load.
* @param {string[]} urls The list of urls to load.
* @param {object} [options] The load options:
* - requestHeaders: an array of {name, value} to use as request headers.
* - withCredentials: credentials flag to pass to the request.
Expand Down Expand Up @@ -107,7 +107,7 @@ export class LoadController {
/**
* Load a list of image files.
*
* @param {FileList} files The list of image files to load.
* @param {File[]} files The list of image files to load.
*/
#loadImageFiles(files) {
// create IO
Expand All @@ -120,7 +120,7 @@ export class LoadController {
/**
* Load a list of image URLs.
*
* @param {Array} urls The list of urls to load.
* @param {string[]} urls The list of urls to load.
* @param {object} [options] The load options:
* - requestHeaders: an array of {name, value} to use as request headers.
* - withCredentials: credentials flag to pass to the request.
Expand Down Expand Up @@ -163,7 +163,7 @@ export class LoadController {
/**
* Load a list of data.
*
* @param {Array|FileList} data Array of data to load.
* @param {string[]|File[]|Array} data Array of data to load.
* @param {object} loader The data loader.
* @param {string} loadType The data load type: 'image' or 'state'.
* @param {object} [options] Options passed to the final loader.
Expand Down

0 comments on commit ad6397d

Please sign in to comment.