Skip to content

FileView.setState method

FileView › setState

Official

Set the state of the file view.

Signature:

setState(state: unknown, result: ViewStateResult): Promise<void>

Parameters:

Parameter Type Description
state unknown The state to set.
result ViewStateResult The result of the state.

Returns: Promise<void>A promise that resolves when the state is set.

Since: 0.9.7

Example:

await fileView.setState({ foo: 'bar' }, { history: true });