IContainerEvents Interface
Events emitted by the IContainer "upwards" to the Loader and Host.
To use, import via @fluidframework/container-definitions/legacy
.
For more information about our API support guarantees, see here.
Signature
export interface IContainerEvents extends IEvent
Extends: IEvent
Call Signatures
CallSignature | Alerts | Description |
---|---|---|
(event: "readonly", listener: (readonly: boolean) => void): void | Alpha |
Emitted when the readonly state of the container changes. |
(event: "op", listener: (message: ISequencedDocumentMessage) => void): any | Alpha |
Emitted immediately after processing an incoming operation (op). |
(event: "dirty", listener: (dirty: boolean) => void): any | Alpha |
Emitted upon the first local change while the Container is in the "saved" state. That is, when isDirty transitions from true to false . |
(event: "saved", listener: (dirty: boolean) => void): any | Alpha |
Emitted when all local changes/edits have been acknowledged by the service. I.e., when isDirty transitions from false to true . |
(event: "metadataUpdate", listener: (metadata: Record<string, string>) => void): any | Alpha |
Emitted when the some of the properties related to the container are initialized or updated. This emitted metadata will the props which are updated. If consumer wants to read full set of metadata then they can read it off the container from containerMetadata prop. |
(event: "connected", listener: (clientId: string) => void): any | Alpha |
Emitted when the IContainer completes connecting to the Fluid service. |
(event: "codeDetailsProposed", listener: (codeDetails: IFluidCodeDetails, proposal: ISequencedProposal) => void): any | Alpha |
Fires when new container code details have been proposed, prior to acceptance. |
(event: "disconnected", listener: () => void): any | Alpha |
Emitted when the IContainer becomes disconnected from the Fluid service. |
(event: "attaching", listener: () => void): any | Alpha |
Emitted when a detached container begins the process of attached to the Fluid service. |
(event: "attached", listener: () => void): any | Alpha |
Emitted when the attaching process is complete and the container is attached to the Fluid service. |
(event: "closed", listener: (error?: ICriticalContainerError) => void): any | Alpha |
Emitted when the IContainer is closed, which permanently disables it. |
(event: "disposed", listener: (error?: ICriticalContainerError) => void): any | Alpha |
Emitted when the IContainer is disposed, which permanently disables it. |
(event: "warning", listener: (error: ContainerWarning) => void): any | Alpha |
Emitted when the container encounters a state which may lead to errors, which may be actionable by the consumer. |
Call Signature Details
(event: "readonly", listener: (readonly: boolean) => void): void
Emitted when the readonly state of the container changes.
To use, import via @fluidframework/container-definitions/alpha
.
For more information about our API support guarantees, see here.
Signature
(event: "readonly", listener: (readonly: boolean) => void): void;
Remarks
Listener parameters:
readonly
: Whether or not the container is now in a readonly state.
See Also
(event: "op", listener: (message: ISequencedDocumentMessage) => void): any
Emitted immediately after processing an incoming operation (op).
To use, import via @fluidframework/container-definitions/alpha
.
For more information about our API support guarantees, see here.
Signature
(event: "op", listener: (message: ISequencedDocumentMessage) => void): any;
Remarks
Note: this event is not intended for general use. Prefer to listen to events on the appropriate ultimate recipients of the ops, rather than listening to the ops directly on the IContainer.
Listener parameters:
message
: The op that was processed.
(event: "dirty", listener: (dirty: boolean) => void): any
Emitted upon the first local change while the Container is in the "saved" state. That is, when isDirty transitions from true
to false
.
To use, import via @fluidframework/container-definitions/alpha
.
For more information about our API support guarantees, see here.
Signature
(event: "dirty", listener: (dirty: boolean) => void): any;
Remarks
Listener parameters:
dirty
: DEPRECATED. This parameter will be removed in a future release.
See Also
(event: "saved", listener: (dirty: boolean) => void): any
Emitted when all local changes/edits have been acknowledged by the service. I.e., when isDirty transitions from false
to true
.
To use, import via @fluidframework/container-definitions/alpha
.
For more information about our API support guarantees, see here.
Signature
(event: "saved", listener: (dirty: boolean) => void): any;
Remarks
Listener parameters:
dirty
: DEPRECATED. This parameter will be removed in a future release.
See Also
(event: "metadataUpdate", listener: (metadata: Record<string, string>) => void): any
Emitted when the some of the properties related to the container are initialized or updated. This emitted metadata will the props which are updated. If consumer wants to read full set of metadata then they can read it off the container from containerMetadata prop.
To use, import via @fluidframework/container-definitions/alpha
.
For more information about our API support guarantees, see here.
Signature
(event: "metadataUpdate", listener: (metadata: Record<string, string>) => void): any;
(event: "connected", listener: (clientId: string) => void): any
Emitted when the IContainer completes connecting to the Fluid service.
To use, import via @fluidframework/container-definitions/alpha
.
For more information about our API support guarantees, see here.
Signature
(event: "connected", listener: (clientId: string) => void): any;
Remarks
Reflects connection state changes against the (delta) service acknowledging ops/edits.
See Also
(event: "codeDetailsProposed", listener: (codeDetails: IFluidCodeDetails, proposal: ISequencedProposal) => void): any
Fires when new container code details have been proposed, prior to acceptance.
To use, import via @fluidframework/container-definitions/alpha
.
For more information about our API support guarantees, see here.
Signature
(event: "codeDetailsProposed", listener: (codeDetails: IFluidCodeDetails, proposal: ISequencedProposal) => void): any;
Remarks
Listener parameters:
-
codeDetails
: The code details being proposed. -
proposal
: NOT RECOMMENDED FOR USE.
See Also
proposeCodeDetails(codeDetails)
(event: "disconnected", listener: () => void): any
Emitted when the IContainer becomes disconnected from the Fluid service.
To use, import via @fluidframework/container-definitions/alpha
.
For more information about our API support guarantees, see here.
Signature
(event: "disconnected", listener: () => void): any;
Remarks
Reflects connection state changes against the (delta) service acknowledging ops/edits.
See Also
(event: "attaching", listener: () => void): any
Emitted when a detached container begins the process of attached to the Fluid service.
To use, import via @fluidframework/container-definitions/alpha
.
For more information about our API support guarantees, see here.
Signature
(event: "attaching", listener: () => void): any;
See Also
(event: "attached", listener: () => void): any
Emitted when the attaching process is complete and the container is attached to the Fluid service.
To use, import via @fluidframework/container-definitions/alpha
.
For more information about our API support guarantees, see here.
Signature
(event: "attached", listener: () => void): any;
See Also
(event: "closed", listener: (error?: ICriticalContainerError) => void): any
Emitted when the IContainer is closed, which permanently disables it.
To use, import via @fluidframework/container-definitions/alpha
.
For more information about our API support guarantees, see here.
Signature
(event: "closed", listener: (error?: ICriticalContainerError) => void): any;
Remarks
Listener parameters:
error
: If the container was closed due to error, this will contain details about the error that caused it.
See Also
(event: "disposed", listener: (error?: ICriticalContainerError) => void): any
Emitted when the IContainer is disposed, which permanently disables it.
To use, import via @fluidframework/container-definitions/alpha
.
For more information about our API support guarantees, see here.
Signature
(event: "disposed", listener: (error?: ICriticalContainerError) => void): any;
Remarks
Listener parameters:
error
: If the container was disposed due to error, this will contain details about the error that caused it.
See Also
(event: "warning", listener: (error: ContainerWarning) => void): any
Emitted when the container encounters a state which may lead to errors, which may be actionable by the consumer.
To use, import via @fluidframework/container-definitions/alpha
.
For more information about our API support guarantees, see here.
Signature
(event: "warning", listener: (error: ContainerWarning) => void): any;
Remarks
Note: this event is not intended for general use. The longer-term intention is to surface warnings more directly on the APIs that produce them. For now, use of this should be avoided when possible.
Listener parameters:
error
: The warning describing the encountered state.