captureVisibleTab method

Future<String> captureVisibleTab(
  1. int? windowId,
  2. ImageDetails? options
)

Captures the visible area of the currently active tab in the specified window. In order to call this method, the extension must have either the <all_urls> permission or the activeTab permission. In addition to sites that extensions can normally access, this method allows extensions to capture sensitive sites that are otherwise restricted, including chrome:-scheme pages, other extensions' pages, and data: URLs. These sensitive sites can only be captured with the activeTab permission. File URLs may be captured only if the extension has been granted file access. windowId The target window. Defaults to the current window.

Implementation

Future<String> captureVisibleTab(
  int? windowId,
  ImageDetails? options,
) async {
  var $res = await promiseToFuture<String>($js.chrome.tabs.captureVisibleTab(
    windowId,
    options?.toJS,
  ));
  return $res;
}