diff options
Diffstat (limited to 'server/src/main/java/com/vaadin/annotations/JavaScript.java')
-rw-r--r-- | server/src/main/java/com/vaadin/annotations/JavaScript.java | 13 |
1 files changed, 10 insertions, 3 deletions
diff --git a/server/src/main/java/com/vaadin/annotations/JavaScript.java b/server/src/main/java/com/vaadin/annotations/JavaScript.java index 0e49904fee..d7b312b40f 100644 --- a/server/src/main/java/com/vaadin/annotations/JavaScript.java +++ b/server/src/main/java/com/vaadin/annotations/JavaScript.java @@ -46,10 +46,17 @@ import com.vaadin.server.ClientConnector; * file was loaded from a different folder. * </ul> * <p> - * Example: <code>@JavaScript({"http://host.com/file1.js", "file2.js"})</code> + * Special Vaadin urls are also supported. The most useful is vaadin:// which + * maps to the location of the automatically published VAADIN folder located on + * your classpath in your resources. Using the VAADIN folder and vaadin:// you + * can publish JavaScript files which use images or other files with relative + * paths. Another example is the theme:// url which maps to the location of your + * current theme. + * <p> + * Example: <code>@JavaScript({"https://host.com/file1.js", "file2.js"})</code> * on the class com.example.MyConnector would load the file - * http://host.com/file1.js as is and file2.js from /com/example/file2.js on the - * server's classpath using the ClassLoader that was used to load + * https://host.com/file1.js as is and file2.js from /com/example/file2.js on + * the server's classpath using the ClassLoader that was used to load * com.example.MyConnector. * <p> * For adding multiple JavaScript files for a single component, you can use this |