load function can be used with any loader object. They takes a
url and one or more loader objects, checks what type of data that loader prefers to work on (e.g. text, JSON, binary, stream, ...), loads the data in the appropriate way, and passes it to the loader.
load function is used to load and parse data with a specific loader object. An array of loader objects can be provided, in which case
load will attempt to autodetect which loader is appropriate for the file.
loaders parameter can also be omitted, in which case any loader objects previously registered with
registerLoaders will be used.
url- Urls can be data urls (
data://) or a request (
https://) urls, or a file name (Node.js only). Also accepts
Blobobject (Browser only). Can also accept any format that is accepted by
parse, with the exception of strings that are interpreted as urls.
loaders- can be a single loader or an array of loaders. If ommitted, will use the list of registered loaders (see
options- optional, contains both options for the read process and options for the loader (see documentation of the specific loader).
arraybuffer- Default depends on loader object. Set to 'text' to read as text.
urlis not a
setPathPrefixwill be appended to relative urls.
urland a loader object, checks what type of data that loader prefers to work on (e.g. text, binary, stream, ...), loads the data in the appropriate way, and passes it to the loader.
loadwill work under Node.js as well.