setIcon method

Future<void> setIcon(
  1. SetIconDetails details
)

Sets the icon for the page action. The icon can be specified either as the path to an image file or as the pixel data from a canvas element, or as dictionary of either one of those. Either the path or the imageData property must be specified.

Implementation

Future<void> setIcon(SetIconDetails details) async {
  await promiseToFuture<void>($js.chrome.pageAction.setIcon(details.toJS));
}