Defines the options for a lazy loading operation.
async/src/lazy-loader/load-options.ts
Properties |
|
alreadyLoaded |
alreadyLoaded:
|
Type: function
|
Optional |
(Optional) A function to customize the way
Use this to change that behaviour. When providing a function, it is the caller's responsability to take care of any previously loaded scripts, objects in memory or anything that may lead
to memory leaks and collisions.
If you don't check properly, you might end up with more than one Example:
When lazy loading Google Maps API you would probably do something like:
|
force |
force:
|
Type: boolean
|
Optional |
(Optional) Specifies whether to force script download in case it was previously loaded.
Default is When forcing download, it is the caller's responsability to take care of any previously loaded scripts, objects in memory or anything that may lead to memory leaks and collisions. |