onJavaScriptMessage method

void onJavaScriptMessage(
  1. String name,
  2. dynamic body
)

Implementation

void onJavaScriptMessage(String name, dynamic body) {
  assert(!_closed);
  final handler = _javaScriptMessageHandlers[name];
  assert(handler != null, "handler $name is not registed.");
  handler?.call(name, body);
}