Skip to content

API reference / Common / ExtensionDocumentHost

Interface: ExtensionDocumentHost ​

What the shell lends an ExtensionDocument it opens.

Properties ​

PropertyDescription
readonly theme
"light" | "dark"
The theme it opens in; ExtensionDocumentViewer.setTheme tells of a change.
readonly locale
string
The language the chrome speaks, a BCP 47 tag.
readonly signal
AbortSignal
Aborted once another document opens or this one is closed — before open resolves, a sign to give up.

Methods ​

progress() ​

ts
progress(loaded, total): void;

Report how far it has read: loaded of total bytes, 0 when the size isn't known — the loading overlay's bar and "document:loading".

Parameters ​

ParameterType
loadednumber
totalnumber