@nextcloud/viewer
    Preparing search index...

    Interface ViewerEmits

    List of emits that can be emitted by your custom component. Use it like this:

    <script setup lang="ts">
    import type { ViewerEmits } from '@nextcloud/viewer'

    const emit = defineEmits<ViewerEmits>()
    interface ViewerEmits {
        errored: [Error];
        loaded: [];
        "update:canSwipe": [boolean];
        "update:editing": [boolean];
    }
    Index
    errored: [Error]

    Emit this event to notify the viewer that an error occurred while loading the file. If provided, a custom error message will be shown.

    The error that occurred

    loaded: []

    Emit this event to notify the viewer that your component is done loading.

    "update:canSwipe": [boolean]

    Emit this event to disable or enable the swiping gesture. This is usually used when your component provides its own swiping mechanism (e.g. the video player controls).

    "update:editing": [boolean]

    Emit this event to notify the viewer that the editing mode changed.

    Whether the viewer is now in editing mode