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.
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).
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
.
For more information about our API support guarantees, see here.