Optional
onLoad: (() => void)Optional
onProgress: ((url, loaded, total) => void)Optional
onError: ((url) => void)Will be called when item loading fails. The default is a function with empty body.
The url of the item that errored.
Will be called when all items finish loading. The default is a function with empty body.
Will be called for each loaded item. The default is a function with empty body.
The url of the item just loaded.
The number of items already loaded so far.
The total amount of items to be loaded.
Optional
onWill be called when loading of an item starts.
The url of the item that started loading.
The number of items already loaded so far.
The total amount of items to be loaded.
If provided, the callback will be passed each resource URL before a request is sent. The callback may return the original URL, or a new URL to override loading behavior. This behavior can be used to load assets from .ZIP files, drag-and-drop APIs, and Data URIs.
Optional
callback: ((url) => string)URL modifier callback. Called with url argument, and must return resolvedURL.
Handles and keeps track of loaded and pending data.