Perseus
    Preparing search index...

    Interface PerseusDependenciesV2

    The modern iteration of Perseus Depedndencies. These dependencies are provided to Perseus through its entrypoints (for example: ServerItemRenderer) and then attached to the DependenciesContext so they are available anywhere down the React render tree.

    Prefer using this type over PerseusDependencies when possible.

    interface PerseusDependenciesV2 {
        analytics: { onAnalyticsEvent: AnalyticsEventHandlerFn };
        generateUrl: (args: GenerateUrlArgs) => string;
        useVideo(
            id: string,
            kind: VideoKind,
        ): Result<{ video: VideoData | null | undefined }>;
    }
    Index

    Properties

    Methods

    Properties

    analytics: { onAnalyticsEvent: AnalyticsEventHandlerFn }
    generateUrl: (args: GenerateUrlArgs) => string

    A function that takes a URL or partial url and may modify it to return the full URL. This may be used to request a resource from a different app to where the widget is rendered, like when embedding a video cross-domain.

    Methods