The JavaScript function alert(). @param message the message
(final Object message)
| 267 | * @param message the message |
| 268 | */ |
| 269 | @JsxFunction |
| 270 | public void alert(final Object message) { |
| 271 | // use Object as parameter and perform String conversion by ourself |
| 272 | // this allows to place breakpoint here and "see" the message object and its properties |
| 273 | final String stringMessage = JavaScriptEngine.toString(message); |
| 274 | final AlertHandler handler = getWebWindow().getWebClient().getAlertHandler(); |
| 275 | if (handler == null) { |
| 276 | if (LOG.isWarnEnabled()) { |
| 277 | LOG.warn("window.alert(\"" + stringMessage + "\") no alert handler installed"); |
| 278 | } |
| 279 | } |
| 280 | else { |
| 281 | handler.handleAlert(document_.getPage(), stringMessage); |
| 282 | } |
| 283 | } |
| 284 | |
| 285 | /** |
| 286 | * Creates a base-64 encoded ASCII string from a string of binary data. |
nothing calls this directly
no test coverage detected