getContexts method
Fetches information about active contexts associated with this extension
filter A filter to find matching contexts. A context matches if it
matches all specified fields in the filter. Any unspecified field in the
filter matches all contexts.
returns Promise that resolves with the matching contexts, if any.
Implementation
Future<List<ExtensionContext>> getContexts(ContextFilter filter) async {
var $res = await $js.chrome.runtime.getContexts(filter.toJS).toDart;
return $res.toDart
.cast<$js.ExtensionContext>()
.map((e) => ExtensionContext.fromJS(e))
.toList();
}