setBlockedURLs method

Future<void> setBlockedURLs({
  1. List<BlockPattern>? urlPatterns,
  2. @Deprecated('This parameter is deprecated') List<String>? urls,
})

Blocks URLs from loading. urlPatterns Patterns to match in the order in which they are given. These patterns also take precedence over any wildcard patterns defined in urls.

Implementation

Future<void> setBlockedURLs({
  List<BlockPattern>? urlPatterns,
  @Deprecated('This parameter is deprecated') List<String>? urls,
}) async {
  await _client.send('Network.setBlockedURLs', {
    if (urlPatterns != null) 'urlPatterns': [...urlPatterns],
    if (urls != null) 'urls': [...urls],
  });
}