sendRequest method
Sends a single request to other listeners within the extension. Similar to
runtime.connect
, but only sends a single request with an optional
response. The extension.onRequest
event is fired in each page of the
extension.
extensionId
The extension ID of the extension you want to connect to.
If omitted, default is your own extension.
Implementation
@Deprecated(r'Please use $(ref:runtime.sendMessage).')
Future<Object> sendRequest(
String? extensionId,
Object request,
) async {
var $res = await promiseToFuture<JSAny>($js.chrome.extension.sendRequest(
extensionId,
request.jsify()!,
));
return $res.dartify()!;
}