wdpr
    Preparing search index...

    Interface RuntimeOptions

    Configuration for initWdprRuntime().

    interface RuntimeOptions {
        fade?: boolean;
        onJoin?: () => Promise<void>;
        onRate?: (pageId: string, points: number) => Promise<RateResult>;
        root?: HTMLElement;
    }
    Index

    Properties

    fade?: boolean

    Whether collapsible blocks use a CSS fade animation when opening and closing. Defaults to true.

    onJoin?: () => Promise<void>

    Called when a user clicks the [[module Join]] button to request membership in the site.

    onRate?: (pageId: string, points: number) => Promise<RateResult>

    Called when a user casts a vote in a [[module Rate]] widget.

    Type Declaration

      • (pageId: string, points: number): Promise<RateResult>
      • Parameters

        • pageId: string

          Identifier of the page being rated

        • points: number

          Vote value (e.g. +1, -1, or 0 to cancel)

        Returns Promise<RateResult>

        Updated aggregate rating data

    root?: HTMLElement

    DOM element to scan for interactive Wikidot markup. Defaults to document.body when omitted.