Skip to content

add client-side API to listen to view lifecycle events #1895

Done

Description

@vlukashov

As a developer I want to execute some JS code in response to entering / leaving a view.

Example: when starting navigation from any one view to another I want to change the page title to ... so that the window title shown in the browser UI clearly indicates that a transition is in progress.

The view life cycle events I would like to have access to:

  • before a view is loaded
  • after a view has been loaded
  • before a view is unloaded
  • after a view has been unloaded

Activity

  1. gilberto-torrezan commented on Jun 26, 2017

    @gilberto-torrezan
    Contributor

    Awaits for #512

  2. added this to the During 2018 candidates milestone on May 31, 2018
  3. modified the milestones: Candidates, Not Planned on Mar 27, 2019
  4. totally-not-ai commented on Dec 5, 2026

    @totally-not-ai
    Contributor

    Closing: Flow dispatches a vaadin-navigated window event after each navigation. For the other phases, the server-side BeforeLeaveObserver/BeforeEnterObserver/AfterNavigationObserver can trigger client-side code via executeJs. A new issue can be opened for a concrete gap.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions