The JavaScript function confirm. @param message the message @return true if ok was pressed, false if cancel was pressed
(final String message)
| 310 | * @return true if ok was pressed, false if cancel was pressed |
| 311 | */ |
| 312 | @JsxFunction |
| 313 | public boolean confirm(final String message) { |
| 314 | final ConfirmHandler handler = getWebWindow().getWebClient().getConfirmHandler(); |
| 315 | if (handler == null) { |
| 316 | if (LOG.isWarnEnabled()) { |
| 317 | LOG.warn("window.confirm(\"" |
| 318 | + message + "\") no confirm handler installed, simulating the OK button"); |
| 319 | } |
| 320 | return true; |
| 321 | } |
| 322 | return handler.handleConfirm(document_.getPage(), message); |
| 323 | } |
| 324 | |
| 325 | /** |
| 326 | * The JavaScript function {@code prompt}. |
nothing calls this directly
no test coverage detected