Options
All
  • Public
  • Public/Protected
  • All
Menu

The document context object.

Type parameters

Hierarchy

  • IDisposable
    • IContext

Implemented by

Index

Properties

contentsModel

contentsModel: IModel | null

The current contents model associated with the document

Notes

The contents model will be null until the context is ready. It will have an empty contents field.

disposed

disposed: ISignal<this, void>

A signal emitted when the context is disposed.

fileChanged

fileChanged: ISignal<this, IModel>

A signal emitted when the contentsModel changes.

isDisposed

isDisposed: boolean

Test whether the object has been disposed.

Notes

This property is always safe to access.

isReady

isReady: boolean

Whether the context is ready.

model

model: T

Get the model associated with the document.

path

path: string

The current path associated with the document.

pathChanged

pathChanged: ISignal<this, string>

A signal emitted when the path changes.

ready

ready: Promise<void>

A promise that is fulfilled when the context is ready.

session

The client session object associated with the context.

Methods

addSibling

  • addSibling(widget: Widget): IDisposable
  • Add a sibling widget to the document manager.

    Parameters

    • widget: Widget

      The widget to add to the document manager.

    Returns IDisposable

    A disposable used to remove the sibling if desired.

    Notes

    It is assumed that the widget has the same model and context as the original widget.

createCheckpoint

deleteCheckpoint

  • deleteCheckpoint(checkpointID: string): Promise<void>
  • Delete a checkpoint for the file.

    Parameters

    • checkpointID: string

      The id of the checkpoint to delete.

    Returns Promise<void>

    A promise which resolves when the checkpoint is deleted.

dispose

  • dispose(): void
  • Dispose of the resources held by the object.

    Notes

    If the object's dispose method is called more than once, all calls made after the first will be a no-op.

    Undefined Behavior

    It is undefined behavior to use any functionality of the object after it has been disposed unless otherwise explicitly noted.

    Returns void

getDownloadUrl

  • getDownloadUrl(path: string): Promise<string>

listCheckpoints

resolveUrl

  • resolveUrl(url: string): Promise<string>

restoreCheckpoint

  • restoreCheckpoint(checkpointID?: string): Promise<void>
  • Restore the file to a known checkpoint state.

    Parameters

    • Optional checkpointID: string

      The optional id of the checkpoint to restore, defaults to the most recent checkpoint.

    Returns Promise<void>

    A promise which resolves when the checkpoint is restored.

revert

  • revert(): Promise<void>

save

  • save(): Promise<void>

saveAs

  • saveAs(): Promise<void>

Generated using TypeDoc