runJavascript method
Runs the given JavaScript in the context of the current page.
The Future completes with an error if a JavaScript error occurred.
Implementation
@override
Future<void> runJavascript(String javascript) async {
final int? webviewId = instanceManager.getInstanceId(this);
if (webviewId == null) {
throw 'Failed to get the webview instance';
}
await _runJavascriptInternal(webviewId, javascript);
}