BrowserSessionStorage class

Storage provider that uses browser session storage.

Extends

Remarks

Anything written to the store will only be persisted for the lifetime of a single page within a browser tab. The storage will survive page reloads but closing the tab will delete anything persisted by the store and opening a new browser tab will create a new persistance store for the page.

const { BrowserSessionStorage, ConversationState } = require('botbuilder');

const conversationState = new ConversationState(new BrowserSessionStorage());

Constructors

BrowserSessionStorage()

Creates a new BrowserSessionStorage instance.

Inherited Methods

delete(string[])

Deletes storage items from storage.

read(string[])

Reads storage items from storage.

write(StoreItems)

Writes storage items to storage.

Constructor Details

BrowserSessionStorage()

Creates a new BrowserSessionStorage instance.

new BrowserSessionStorage()

Inherited Method Details

delete(string[])

Deletes storage items from storage.

function delete(keys: string[]): Promise<void>

Parameters

keys

string[]

Keys of the StoreItems objects to delete.

Returns

Promise<void>

A promise representing the async operation.

Inherited From MemoryStorage.delete

read(string[])

Reads storage items from storage.

function read(keys: string[]): Promise<StoreItems>

Parameters

keys

string[]

Keys of the StoreItems objects to read.

Returns

Promise<StoreItems>

The read items.

Inherited From MemoryStorage.read

write(StoreItems)

Writes storage items to storage.

function write(changes: StoreItems): Promise<void>

Parameters

changes
StoreItems

The StoreItems to write, indexed by key.

Returns

Promise<void>

A promise representing the async operation.

Inherited From MemoryStorage.write