Maluma Maluma - 20 days ago 5
Dart Question

Alert dialog from <webview> was blocked

Dart doesn't show the alert dialog when I use a webview and show this error:

: An alert dialog was blocked. (extensions::webViewEvents:225)

: A confirm dialog was blocked. (extensions::webViewEvents:225)

Does anyone know how to bypass the problem or how to catch the error?


Sorry for my bad English.


The code used:

Element webview= querySelector("#webview");
Map<String,String> map=new Map();

DartEditor version= STABLE build 45396

The version number of the SDK= 1.10.0

The webview loads a page that works on a js not created by me.

The error occurs when using this:


Xan Xan

A webview cannot show those by default.

You need to catch the dialog event, show your own UI for it (remember, Apps can't use alert and friends, so a <dialog> is a good option) and then pass the response back with DialogController