Package com.vaadin.client
Class DependencyLoader
java.lang.Object
com.vaadin.client.DependencyLoader
Handles loading of dependencies (stylesheets and scripts) in the application.
- Since:
- 1.0
- Author:
- Vaadin Ltd
-
Constructor Summary
ConstructorsConstructorDescriptionDependencyLoader(Registry registry) Creates a new instance connected to the given registry. -
Method Summary
Modifier and TypeMethodDescriptionvoidloadDependencies(JsMap<LoadMode, elemental.json.JsonArray> clientDependencies) Triggers loading of the given dependencies.voidPrevents eager dependencies from being considered as loaded untilHTMLImports.whenReadyhas been run.static voidrunWhenEagerDependenciesLoaded(Command command) Adds a command to be run when all eager dependencies have finished loading.
-
Constructor Details
-
DependencyLoader
Creates a new instance connected to the given registry.- Parameters:
registry- the global registry
-
-
Method Details
-
runWhenEagerDependenciesLoaded
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
Triggers loading of the given dependencies.- Parameters:
clientDependencies- the map of the dependencies to load, divided into groups by load mode, notnull.
-
requireHtmlImportsReady
public void requireHtmlImportsReady()Prevents eager dependencies from being considered as loaded untilHTMLImports.whenReadyhas been run.
-