Class DependencyLoader

java.lang.Object
com.vaadin.client.DependencyLoader

public class DependencyLoader extends Object
Handles loading of dependencies (stylesheets and scripts) in the application.
Since:
1.0
Author:
Vaadin Ltd
  • Constructor Details

    • DependencyLoader

      public DependencyLoader(Registry registry)
      Creates a new instance connected to the given registry.
      Parameters:
      registry - the global registry
  • Method Details

    • runWhenEagerDependenciesLoaded

      public static void runWhenEagerDependenciesLoaded(Command command)
      Adds a command to be run when all eager dependencies have finished loading.

      If no eager dependencies are currently being loaded, runs the command immediately.

      Parameters:
      command - the command to run when eager dependencies have been loaded
      See Also:
      • startEagerDependencyLoading()
      • endEagerDependencyLoading()
    • loadDependencies

      public void loadDependencies(JsMap<com.vaadin.flow.shared.ui.LoadMode,elemental.json.JsonArray> clientDependencies)
      Triggers loading of the given dependencies.
      Parameters:
      clientDependencies - the map of the dependencies to load, divided into groups by load mode, not null.
    • requireHtmlImportsReady

      public void requireHtmlImportsReady()
      Prevents eager dependencies from being considered as loaded until HTMLImports.whenReady has been run.