def navigated
      url = get_location
      @params = []

      idx = match(path_to_parts(decode(url.pathname)), decode(url.search))

      if idx
        @routes[idx][:callback].call(@params)
      else
        @page404.call(url.pathname)
      end
    end
def navigated
      url = get_location
      @params = []

      idx = match(path_to_parts(decode(url.pathname)), decode(url.search))

      if idx
        @routes[idx][:callback].call(@params)
      else
        @page404.call(url.pathname)
      end
    end
Internal method called when the web browser navigates