Interface AbstractRouteNotFoundError.CopilotJs

All Superinterfaces:
Serializable
Enclosing class:
AbstractRouteNotFoundError

@JsDefinition public static interface AbstractRouteNotFoundError.CopilotJs extends Serializable
What this page tells Copilot, as a JavaScript definition for Element.executeJs(Class).
Since:
25.4
  • Method Summary

    Modifier and Type
    Method
    Description
    Tells Copilot that the project has no routes yet, waiting for it to load rather than assuming it already has.
  • Method Details

    • reportNoRoutes

      @JsExpression("return new Promise((resolve) => {\n (function poll() {\n if (window.Vaadin?.copilot?.noRoutesInProject) {\n window.Vaadin.copilot.noRoutesInProject();\n resolve();\n } else {\n setTimeout(poll, 100);\n }\n })();\n});\n") PendingJavaScriptResult reportNoRoutes()
      Tells Copilot that the project has no routes yet, waiting for it to load rather than assuming it already has.
      Returns:
      the pending result, which completes once Copilot has been told, and never if Copilot is not available