def enable_event_listener
      @event_listener ||= lambda do |event|
        self.page = @page ? @page.getEnclosingWindow.getEnclosedPage : event.getNewPage
      end

      listener.add_listener(:web_window_event, &@event_listener)
    end
def enable_event_listener
      @event_listener ||= lambda do |event|
        self.page = @page ? @page.getEnclosingWindow.getEnclosedPage : event.getNewPage
      end

      listener.add_listener(:web_window_event, &@event_listener)
    end
Enable Celerity's internal WebWindowEventListener

 @api private