Options
All
  • Public
  • Public/Protected
  • All
Menu

Object responsible for sending and receiving live share events.

remarks

Live objects send and receive events using an event scope. Event scopes can be restricted to only receive events from clients with specific roles. Any events that are received from clients without an allowed role type will be ignored.

Event scopes are isolated on a per Fluid object basis. That means that two different Fluid objects using the same event names don't have to worry about collisions. Two event scopes within the same Fluid object, however, don't have any isolation. You can use multiple event scopes within the same FLuid object, you just need to be careful that they send different events.

Hierarchy

  • TypedEventEmitter<IErrorEvent>
    • LiveEventScope

Index

Constructors

Accessors

  • get clientId(): undefined | string

Methods

  • sendEvent<TEvent>(eventName: string, evt?: Partial<TEvent>): TEvent
  • Sends an event to other event scope instances for the Fluid object.

    Type Parameters

    Parameters

    • eventName: string

      Name of the event to send.

    • evt: Partial<TEvent> = {}

      Optional. Partial event object to send. The ILiveEvent.name, ILiveEvent.timestamp, and ILiveEvent.clientId fields will be automatically populated prior to sending.

    Returns TEvent

    The full event, including ILiveEvent.name, ILiveEvent.timestamp, and ILiveEvent.clientId fields if known.

Generated using TypeDoc