sendRequest method

  1. @Deprecated(r'Please use $(ref:runtime.sendMessage).')
Future<Object> sendRequest(
  1. int tabId,
  2. Object request
)

Sends a single request to the content script(s) in the specified tab, with an optional callback to run when a response is sent back. The extension.onRequest event is fired in each content script running in the specified tab for the current extension.

Implementation

@Deprecated(r'Please use $(ref:runtime.sendMessage).')
Future<Object> sendRequest(
  int tabId,
  Object request,
) async {
  var $res = await promiseToFuture<JSAny>($js.chrome.tabs.sendRequest(
    tabId,
    request.jsify()!,
  ));
  return $res.dartify()!;
}