From: <mb...@us...> - 2004-10-28 14:12:59
|
Log Message: ----------- Added comments to executeJavascriptIfPossible() to discourage people from calling it directly. Modified Files: -------------- htmlunit/src/java/com/gargoylesoftware/htmlunit/html: HtmlPage.java (http://cvs.sourceforge.net/viewcvs.py/htmlunit/htmlunit/src/java/com/gargoylesoftware/htmlunit/html/HtmlPage.java) Revision Data ------------- Index: HtmlPage.java =================================================================== RCS file: /cvsroot/htmlunit/htmlunit/src/java/com/gargoylesoftware/htmlunit/html/HtmlPage.java,v retrieving revision 1.76 retrieving revision 1.77 diff -Lsrc/java/com/gargoylesoftware/htmlunit/html/HtmlPage.java -Lsrc/java/com/gargoylesoftware/htmlunit/html/HtmlPage.java -u -d -r1.76 -r1.77 --- src/java/com/gargoylesoftware/htmlunit/html/HtmlPage.java +++ src/java/com/gargoylesoftware/htmlunit/html/HtmlPage.java @@ -656,11 +656,18 @@ } /** + * <p> * Execute the specified javascript if a javascript engine was successfully * instantiated. If this javascript causes the current page to be reloaded * (through location="" or form.submit()) then return the new page. Otherwise * return the current page. - * + * </p> + * <p><b>Please note:</b> Although this method is public, it is not intended for + * general execution of javascript. Users of HtmlUnit should interact with the pages + * as a user would by clicking on buttons or links and having the javascript event + * handlers execute as needed.. + * </p> + * * @param sourceCode The javascript code to execute. * @param sourceName The name for this chunk of code. This name will be displayed * in any error messages. |