Executes the specified JavaScript code within the page. The usage would be similar to what can be achieved to execute JavaScript in the current page by entering "javascript:...some JS code..." in the URL field of a native browser.
Note: the provided code won't be executed if JavaScript has been disabled on the WebClient (see {@link WebClient#isJavaScriptEnabled()}.
@param sourceCode the JavaScript code to execute @return a ScriptResult which will contain both the current page (which may be different thanthe previous page) and a JavaScript result objectThis method allows one to inject javascript from the server to client. A client implementation is not required to implement this functionality, but currently all web-based clients do implement this.
Executing javascript this way often leads to cross-browser compatibility issues and regressions that are hard to resolve. Use of this method should be avoided and instead it is recommended to create new widgets with GWT. For more info on creating own, reusable client-side widgets in Java, read the corresponding chapter in Book of Vaadin.
@param script JavaScript snippet that will be executed. @deprecated As of 7.0, use JavaScript.getCurrent().execute(String)instead
|
|
|
|
|
|
|
|
|
|
|
|