@vivliostyle/core
    Preparing search index...

    Interface CounterResolver

    interface CounterResolver {
        getNamedStringVal(name: string, retrievePosition: string): Val;
        getPageCountersVal(name: string, format: (p1: number[]) => string): Val;
        getPageCounterVal(name: string, format: (p1: number) => string): Val;
        getRunningElementVal(name: string, retrievePosition: string): Val;
        getTargetCountersVal(
            url: string,
            name: string,
            format: (p1: number[]) => string,
        ): Val;
        getTargetCounterVal(
            url: string,
            name: string,
            format: (p1: number) => string,
        ): Val;
        getTargetTextVal(url: string, pseudoElement: string): Val;
        setNamedString(
            name: string,
            stringValue: string,
            elementOffset: number,
        ): void;
        setRunningElement(name: string, elementOffset: number): void;
        setStyler(styler: CssStyler.AbstractStyler): void;
    }
    Index

    Methods

    • Returns an Exprs.Val, whose value is calculated at the layout time by retrieving the page-based counters by its name and formatting the values into a string.

      Parameters

      • name: string

        Name of the page-based counters to be retrieved

      • format: (p1: number[]) => string

        A function that formats the counter values (passed as an array ordered by the nesting depth with the outermost counter first and the innermost last) into a string

      Returns Val

    • Returns an Exprs.Val, whose value is calculated at the layout time by retrieving the innermost page-based counter (null if it does not exist) by its name and formatting the value into a string.

      Parameters

      • name: string

        Name of the page-based counter to be retrieved

      • format: (p1: number) => string

        A function that formats the counter value into a string

      Returns Val

    • Parameters

      • url: string
      • name: string
      • format: (p1: number[]) => string

      Returns Val

    • Parameters

      • url: string
      • name: string
      • format: (p1: number) => string

      Returns Val