For AI agents: the complete documentation index is available at /en/llms.txt, the full documentation bundle is available at /en/llms-full.txt, and this page is available as Markdown at /en/reference/sdk/sapi/runtime/functions/pushOrRewind.md.
  • English
  • Function: pushOrRewind()

    function pushOrRewind(stack: string[], target: string): string[];

    Defined in: sapi/runtime/nav-stack.ts:6

    前进到新页则压栈;目标已在栈中则回退到该页。

    Parameters

    ParameterType
    stackstring[]
    targetstring

    Returns

    string[]