Class PopStateHandler


  • public class PopStateHandler
    extends Object
    Handles popstate events and sends them to the server.
    Since:
    1.0
    Author:
    Vaadin Ltd
    • Constructor Detail

      • PopStateHandler

        public PopStateHandler​(Registry registry)
        Creates a new popstate listener for delivering events to the server. Ignores events caused by hash changes, e.g. when the page stays the same.

        If the UI is stopped when a popstate event occurs, performs a refresh to restart the UI.

        NOTE: the listening won't start before invoking bind().

        Parameters:
        registry - the registry to bind to
    • Method Detail

      • bind

        public void bind()
        Start listening to popstate events and send them to the server.

        This method should be triggered only once per instance.