getResources method

Future<List<Resource>> getResources()

Retrieves the list of resources from the inspected page. returns A function that receives the list of resources when the request completes.

Implementation

Future<List<Resource>> getResources() {
  var $completer = Completer<List<Resource>>();
  $js.chrome.devtools.inspectedWindow.getResources((JSArray resources) {
    if (checkRuntimeLastError($completer)) {
      $completer.complete(resources.toDart
          .cast<$js.Resource>()
          .map((e) => Resource.fromJS(e))
          .toList());
    }
  }.toJS);
  return $completer.future;
}