Package com.vaadin.client
Class DependencyLoader
- java.lang.Object
-
- com.vaadin.client.DependencyLoader
-
public class DependencyLoader extends Object
Handles loading of dependencies (style sheets and scripts) in the application. UseApplicationConfiguration.runWhenDependenciesLoaded(Command)
to execute a command after all dependencies have finished loading.- Since:
- 8.0
- Author:
- Vaadin Ltd
-
-
Constructor Summary
Constructors Constructor Description DependencyLoader()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
loadDependencies(ValueMap json)
Loads the any dependencies present in the given json snippet.void
setConnection(ApplicationConnection connection)
Sets the ApplicationConnection this instance is connected to.
-
-
-
Method Detail
-
setConnection
public void setConnection(ApplicationConnection connection)
Sets the ApplicationConnection this instance is connected to. Only used internally.- Parameters:
connection
- The ApplicationConnection for this instance
-
loadDependencies
public void loadDependencies(ValueMap json)
Loads the any dependencies present in the given json snippet. Handles all dependencies found with the key "dependencies". Ensures that- JavaScript dependencies are loaded in the given order.
- HTML imports are loaded after all JavaScripts are loaded and executed.
- Style sheets are loaded and evaluated in some undefined order
- Parameters:
json
- the JSON containing the dependencies to load
-
-