deleteCookies method

Future<void> deleteCookies(
  1. String name, {
  2. String? url,
  3. String? domain,
  4. String? path,
  5. String? partitionKey,
})

Deletes browser cookies with matching name and url or domain/path/partitionKey pair. name Name of the cookies to remove. url If specified, deletes all the cookies with the given name where domain and path match provided URL. domain If specified, deletes only cookies with the exact domain. path If specified, deletes only cookies with the exact path. partitionKey If specified, deletes only cookies with the the given name and partitionKey where domain matches provided URL.

Implementation

Future<void> deleteCookies(String name,
    {String? url, String? domain, String? path, String? partitionKey}) async {
  await _client.send('Network.deleteCookies', {
    'name': name,
    if (url != null) 'url': url,
    if (domain != null) 'domain': domain,
    if (path != null) 'path': path,
    if (partitionKey != null) 'partitionKey': partitionKey,
  });
}