setIcon method

Future<void> setIcon(
  1. SetIconDetails details
)

Sets the icon for the 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.action.setIcon(details.toJS));
}