Options
All
  • Public
  • Public/Protected
  • All
Menu

Class AttachmentModel

The default implementation of a notebook attachment model. The namespace for AttachmentModel statics.

Hierarchy

  • AttachmentModel

Implements

Index

Constructors

constructor

Properties

Private _changed

_changed: Signal<this, void> = new Signal<this, void>(this)

Private _data

_data: IObservableJSON

Private _raw

_raw: JSONObject

Private _rawData

_rawData: ReadonlyJSONObject

trusted

trusted: boolean = false

Accessors

changed

  • get changed(): ISignal<this, void>
  • A signal emitted when the attachment model changes.

    Returns ISignal<this, void>

data

  • get data(): ReadonlyJSONObject

metadata

  • get metadata(): ReadonlyJSONObject

Methods

Private _updateObservable

  • _updateObservable(observable: IObservableJSON, data: ReadonlyJSONObject): void
  • Update an observable JSON object using a readonly JSON object.

    Parameters

    • observable: IObservableJSON
    • data: ReadonlyJSONObject

    Returns void

dispose

  • dispose(): void

setData

  • setData(options: ISetDataOptions): void
  • Set the data associated with the model.

    Notes

    Depending on the implementation of the mime model, this call may or may not have deferred effects,

    Parameters

    • options: ISetDataOptions

    Returns void

toJSON

  • toJSON(): IMimeBundle

Static getData

  • getData(bundle: IMimeBundle): JSONObject
  • Get the data for an attachment.

    params

    bundle - A kernel attachment MIME bundle.

    Parameters

    • bundle: IMimeBundle

    Returns JSONObject

    • The data for the payload.

Generated using TypeDoc