Interface History.HistoryJs

All Superinterfaces:
Serializable
Enclosing class:
History

@JsDefinition public static interface History.HistoryJs extends Serializable
What this history asks of the browser, as a JavaScript definition for Page.executeJs(Class).
Since:
25.4
  • Method Summary

    Modifier and Type
    Method
    Description
    void
    Goes back one entry, as the back button of the browser does.
    void
    Goes forward one entry, as the forward button of the browser does.
    void
    go(int steps)
    Goes the given number of entries forward, or backward for a negative number.
    void
    navigatePushing(tools.jackson.databind.node.BaseJsonNode state, String url, boolean callback)
    Hands the address to the client side router, which pushes the history entry itself once it has navigated.
    void
    navigateReplacing(tools.jackson.databind.node.BaseJsonNode state, String url, boolean callback)
    Hands the address to the client side router, which replaces the current history entry once it has navigated.
    void
    pushState(tools.jackson.databind.node.BaseJsonNode state, String url)
    Pushes a history entry, for an application whose client side router does not write one itself.
    void
    replaceState(tools.jackson.databind.node.BaseJsonNode state, String url)
    Replaces the current history entry, for an application whose client side router does not write one itself.
  • Method Details

    • pushState

      @JsExpression("setTimeout(() => { window.history.pushState($0, \'\', $1); window.dispatchEvent(new CustomEvent(\'vaadin-navigated\')); })") void pushState(tools.jackson.databind.node.BaseJsonNode state, String url)
      Pushes a history entry, for an application whose client side router does not write one itself.
      Parameters:
      state - the state of the entry, or null for none
      url - the address of the entry
    • replaceState

      @JsExpression("setTimeout(() => { window.history.replaceState($0, \'\', $1); window.dispatchEvent(new CustomEvent(\'vaadin-navigated\')); })") void replaceState(tools.jackson.databind.node.BaseJsonNode state, String url)
      Replaces the current history entry, for an application whose client side router does not write one itself.
      Parameters:
      state - the state of the entry, or null for none
      url - the address of the entry
    • back

      @JsExpression("history.back()") void back()
      Goes back one entry, as the back button of the browser does.
    • forward

      @JsExpression("history.forward()") void forward()
      Goes forward one entry, as the forward button of the browser does.
    • go

      @JsExpression("history.go($0)") void go(int steps)
      Goes the given number of entries forward, or backward for a negative number.
      Parameters:
      steps - how many entries to go, where zero reloads the page