Use case
- Create a WebViewController
- Register the callback for console messages with
setOnConsoleMessage
- If the same controller is reused later and we try to register the same callback with
setOnConsoleMessage it's going to throw an Exception.
There is no real way to avoid this as there is no way to unregister that channel.
Proposal
To add a new method in the WebViewController class to unregister the one created by setOnConsoleMessage.
A workaround for this is to manually call:
webViewController.removeJavaScriptChannel(
'fltConsoleMessage', // this is the channel name according to source code
);
Use case
setOnConsoleMessagesetOnConsoleMessageit's going to throw an Exception.There is no real way to avoid this as there is no way to unregister that channel.
Proposal
To add a new method in the WebViewController class to unregister the one created by
setOnConsoleMessage.A workaround for this is to manually call: