@nextcloud/viewer
    Preparing search index...

    Interface ViewerEventMap

    What the viewer tells about itself, on the viewer (getViewer()) for any page, and on the session open() resolves with for its opener. Shaped like what handler elements emit: a CustomEvent whose detail holds the values.

    interface ViewerEventMap {
        "before-download": CustomEvent<ViewerBeforeDownloadDetail>;
        close: CustomEvent<[]>;
        "update:editing": CustomEvent<[editing: boolean]>;
        "update:file": CustomEvent<[file: IFile]>;
    }
    Index
    "before-download": CustomEvent<ViewerBeforeDownloadDetail>

    The file shown is about to be downloaded, from the viewer's own Download, Ctrl+S or the Files download action. The same event the handler's element gets: what is handed to waitUntil() holds the download, and a promise that rejects cancels it.

    close: CustomEvent<[]>

    The viewer closed.

    "update:editing": CustomEvent<[editing: boolean]>

    Editing was entered or left.

    "update:file": CustomEvent<[file: IFile]>

    Another file is shown: the next or previous one, or the one after a deleted file. Not when a page asks for it with goTo().