getBackgroundPage method

  1. @Deprecated(r'Background pages do not exist in MV3 extensions.')
Future<JSObject?> getBackgroundPage()

Retrieves the JavaScript 'window' object for the background page running inside the current extension/app. If the background page is an event page, the system will ensure it is loaded before calling the callback. If there is no background page, an error is set.

Implementation

@Deprecated(r'Background pages do not exist in MV3 extensions.')
Future<JSObject?> getBackgroundPage() async {
  var $res = await $js.chrome.runtime.getBackgroundPage().toDart;
  return $res;
}