Skip to content 

Loader Class

Packages > @fluidframework/container-loader > Loader

Manages Fluid resource loading

Signature:

export declare class Loader extends EventEmitter implements ILoader 

Extends: EventEmitter

Implements: ILoader

Constructors

List of constructors for this class
Constructor Modifiers Description
(constructor)(resolver, documentServiceFactory, codeLoader, options, scope, proxyLoaderFactories, logger) Constructs a new instance of the Loader class

Properties

List of properties for this class
Property Modifiers Type Description
IFluidRouter IFluidRouter

Methods

List of methods on this class
Method Modifiers Description
createDetachedContainer(codeDetails)
rehydrateDetachedContainerFromSnapshot(snapshot)
request(request)
requestWorker(baseUrl, request)
resolve(request)

Constructors

Loader.(constructor)

Constructs a new instance of the Loader class

Signature:

constructor(resolver: IUrlResolver | IUrlResolver[], documentServiceFactory: IDocumentServiceFactory | IDocumentServiceFactory[], codeLoader: ICodeLoader, options: any, scope: IFluidObject, proxyLoaderFactories: Map<string, IProxyLoaderFactory>, logger?: ITelemetryBaseLogger);

Parameters

List of parameters
Parameter Type Description
resolver IUrlResolver | IUrlResolver[]
documentServiceFactory IDocumentServiceFactory | IDocumentServiceFactory[]
codeLoader ICodeLoader
options any
scope IFluidObject
proxyLoaderFactories MapIProxyLoaderFactory>
logger ITelemetryBaseLogger

Properties

IFluidRouter

Signature:

get IFluidRouter(): IFluidRouter;

Methods

createDetachedContainer

Signature:

createDetachedContainer(codeDetails: IFluidCodeDetails): Promise<Container>;

Parameters

List of parameters
Parameter Type Description
codeDetails IFluidCodeDetails

Returns:

Promise<Container>

rehydrateDetachedContainerFromSnapshot

Signature:

rehydrateDetachedContainerFromSnapshot(snapshot: ISnapshotTree): Promise<Container>;

Parameters

List of parameters
Parameter Type Description
snapshot ISnapshotTree

Returns:

Promise<Container>

request

Signature:

request(request: IRequest): Promise<IResponse>;

Parameters

List of parameters
Parameter Type Description
request IRequest

Returns:

Promise<IResponse>

requestWorker

Signature:

requestWorker(baseUrl: string, request: IRequest): Promise<IResponse>;

Parameters

List of parameters
Parameter Type Description
baseUrl string
request IRequest

Returns:

Promise<IResponse>

resolve

Signature:

resolve(request: IRequest): Promise<Container>;

Parameters

List of parameters
Parameter Type Description
request IRequest

Returns:

Promise<Container>