diff options
Diffstat (limited to 'src/com/vaadin/ui/Root.java')
-rw-r--r-- | src/com/vaadin/ui/Root.java | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/src/com/vaadin/ui/Root.java b/src/com/vaadin/ui/Root.java index 8792bf1912..9814084cbc 100644 --- a/src/com/vaadin/ui/Root.java +++ b/src/com/vaadin/ui/Root.java @@ -408,6 +408,8 @@ public abstract class Root extends AbstractComponentContainer implements private DirtyConnectorTracker dirtyConnectorTracker = new DirtyConnectorTracker( this); + private JavascriptManager javascriptManager; + private RootServerRpc rpc = new RootServerRpc() { public void click(MouseEventDetails mouseDetails) { fireEvent(new ClickEvent(Root.this, mouseDetails)); @@ -1590,4 +1592,14 @@ public abstract class Root extends AbstractComponentContainer implements return dirtyConnectorTracker; } + public JavascriptManager getJavascriptManager() { + if (javascriptManager == null) { + // Create and attach on first use + javascriptManager = new JavascriptManager(); + addExtension(javascriptManager); + } + + return javascriptManager; + } + } |