Colibrio Reader Framework API - Cloud license
    Preparing search index...

    Interface IReaderPublicationStorageArea

    Provides access to the localStorage or sessionStorage used by scripted content documents.

    interface IReaderPublicationStorageArea {
        clear(): void;
        getItem(key: string): string;
        getItems(): [string, string][];
        getType(): ReaderPublicationStorageAreaType;
        removeItem(key: string): void;
        setItem(key: string, value: string): void;
        setItems(
            items: [string, string][],
            emitStorageChangedEngineEvent: boolean,
        ): void;
    }

    Methods

    • Remove all items from this storage area.

      Returns void

    • Get the value for the specified key, or null if the key does not exist in this storage area.

      Parameters

      • key: string

      Returns string

    • Get all items in this storage area as an array of key-value pairs.

      Returns [string, string][]

    • Remove the key from the storage if it exists.

      If there is no item associated with the key, this method does nothing.

      Parameters

      • key: string

      Returns void

    • Add the key to the storage, or update that key's value if it already exists.

      Parameters

      • key: string
      • value: string

      Returns void

    • Adds or updates the items in this storage from the provided list of key-value pairs.

      The boolean option emitStorageChangedEngineEvent controls if publicationStorageChanged EngineEvents should be emitted for each item.

      Parameters

      • items: [string, string][]
      • emitStorageChangedEngineEvent: boolean

      Returns void