|
|
@@ -57,7 +57,7 @@ class Loader {
|
|
|
* The [request header]{@link https://developer.mozilla.org/en-US/docs/Glossary/Request_header}
|
|
|
* used in HTTP request.
|
|
|
*
|
|
|
- * @type {Object}
|
|
|
+ * @type {Object<string, any>}
|
|
|
*/
|
|
|
this.requestHeader = {};
|
|
|
|
|
|
@@ -69,8 +69,8 @@ class Loader {
|
|
|
*
|
|
|
* @param {string} url - The path/URL of the file to be loaded.
|
|
|
* @param {Function} onLoad - Executed when the loading process has been finished.
|
|
|
- * @param {onProgressCallback} onProgress - Executed while the loading is in progress.
|
|
|
- * @param {onErrorCallback} onError - Executed when errors occur.
|
|
|
+ * @param {onProgressCallback} [onProgress] - Executed while the loading is in progress.
|
|
|
+ * @param {onErrorCallback} [onError] - Executed when errors occur.
|
|
|
*/
|
|
|
load( /* url, onLoad, onProgress, onError */ ) {}
|
|
|
|
|
|
@@ -78,7 +78,7 @@ class Loader {
|
|
|
* A async version of {@link Loader#load}.
|
|
|
*
|
|
|
* @param {string} url - The path/URL of the file to be loaded.
|
|
|
- * @param {onProgressCallback} onProgress - Executed while the loading is in progress.
|
|
|
+ * @param {onProgressCallback} [onProgress] - Executed while the loading is in progress.
|
|
|
* @return {Promise} A Promise that resolves when the asset has been loaded.
|
|
|
*/
|
|
|
loadAsync( url, onProgress ) {
|