Experimental API: May be changed in next release and may not yet work perfectly! This shuts down the whole client and restarts with a new empty window. Cookies and other states are preserved.
()
| 2385 | * Cookies and other states are preserved. |
| 2386 | */ |
| 2387 | public void reset() { |
| 2388 | close(); |
| 2389 | |
| 2390 | // this has to be done after the browser version was set |
| 2391 | webConnection_ = new HttpWebConnection(this); |
| 2392 | if (javaScriptEngineEnabled_) { |
| 2393 | scriptEngine_ = new JavaScriptEngine(this); |
| 2394 | } |
| 2395 | |
| 2396 | // The window must be constructed AFTER the script engine. |
| 2397 | currentWindowTracker_ = new CurrentWindowTracker(this, true); |
| 2398 | currentWindow_ = new TopLevelWindow("", this); |
| 2399 | } |
| 2400 | |
| 2401 | /** |
| 2402 | * <p>Blocks until all background JavaScript tasks have finished executing or until the specified |