Dart Documentationchrome.eventsUrlFilter

UrlFilter class

Filters URLs for various criteria. See event filtering. All criteria are case sensitive.

class UrlFilter extends ChromeObject {
 UrlFilter({String hostContains, String hostEquals, String hostPrefix, String hostSuffix, String pathContains, String pathEquals, String pathPrefix, String pathSuffix, String queryContains, String queryEquals, String queryPrefix, String querySuffix, String urlContains, String urlEquals, String urlMatches, String originAndPathMatches, String urlPrefix, String urlSuffix, List<String> schemes, List<dynamic> ports}) {
   if (hostContains != null) this.hostContains = hostContains;
   if (hostEquals != null) this.hostEquals = hostEquals;
   if (hostPrefix != null) this.hostPrefix = hostPrefix;
   if (hostSuffix != null) this.hostSuffix = hostSuffix;
   if (pathContains != null) this.pathContains = pathContains;
   if (pathEquals != null) this.pathEquals = pathEquals;
   if (pathPrefix != null) this.pathPrefix = pathPrefix;
   if (pathSuffix != null) this.pathSuffix = pathSuffix;
   if (queryContains != null) this.queryContains = queryContains;
   if (queryEquals != null) this.queryEquals = queryEquals;
   if (queryPrefix != null) this.queryPrefix = queryPrefix;
   if (querySuffix != null) this.querySuffix = querySuffix;
   if (urlContains != null) this.urlContains = urlContains;
   if (urlEquals != null) this.urlEquals = urlEquals;
   if (urlMatches != null) this.urlMatches = urlMatches;
   if (originAndPathMatches != null) this.originAndPathMatches = originAndPathMatches;
   if (urlPrefix != null) this.urlPrefix = urlPrefix;
   if (urlSuffix != null) this.urlSuffix = urlSuffix;
   if (schemes != null) this.schemes = schemes;
   if (ports != null) this.ports = ports;
 }
 UrlFilter.fromProxy(JsObject jsProxy): super.fromProxy(jsProxy);

 /**
  * Matches if the host name of the URL contains a specified string. To test
  * whether a host name component has a prefix 'foo', use hostContains: '.foo'.
  * This matches 'www.foobar.com' and 'foo.com', because an implicit dot is
  * added at the beginning of the host name. Similarly, hostContains can be
  * used to match against component suffix ('foo.') and to exactly match
  * against components ('.foo.'). Suffix- and exact-matching for the last
  * components need to be done separately using hostSuffix, because no implicit
  * dot is added at the end of the host name.
  */
 String get hostContains => jsProxy['hostContains'];
 set hostContains(String value) => jsProxy['hostContains'] = value;

 /**
  * Matches if the host name of the URL is equal to a specified string.
  */
 String get hostEquals => jsProxy['hostEquals'];
 set hostEquals(String value) => jsProxy['hostEquals'] = value;

 /**
  * Matches if the host name of the URL starts with a specified string.
  */
 String get hostPrefix => jsProxy['hostPrefix'];
 set hostPrefix(String value) => jsProxy['hostPrefix'] = value;

 /**
  * Matches if the host name of the URL ends with a specified string.
  */
 String get hostSuffix => jsProxy['hostSuffix'];
 set hostSuffix(String value) => jsProxy['hostSuffix'] = value;

 /**
  * Matches if the path segment of the URL contains a specified string.
  */
 String get pathContains => jsProxy['pathContains'];
 set pathContains(String value) => jsProxy['pathContains'] = value;

 /**
  * Matches if the path segment of the URL is equal to a specified string.
  */
 String get pathEquals => jsProxy['pathEquals'];
 set pathEquals(String value) => jsProxy['pathEquals'] = value;

 /**
  * Matches if the path segment of the URL starts with a specified string.
  */
 String get pathPrefix => jsProxy['pathPrefix'];
 set pathPrefix(String value) => jsProxy['pathPrefix'] = value;

 /**
  * Matches if the path segment of the URL ends with a specified string.
  */
 String get pathSuffix => jsProxy['pathSuffix'];
 set pathSuffix(String value) => jsProxy['pathSuffix'] = value;

 /**
  * Matches if the query segment of the URL contains a specified string.
  */
 String get queryContains => jsProxy['queryContains'];
 set queryContains(String value) => jsProxy['queryContains'] = value;

 /**
  * Matches if the query segment of the URL is equal to a specified string.
  */
 String get queryEquals => jsProxy['queryEquals'];
 set queryEquals(String value) => jsProxy['queryEquals'] = value;

 /**
  * Matches if the query segment of the URL starts with a specified string.
  */
 String get queryPrefix => jsProxy['queryPrefix'];
 set queryPrefix(String value) => jsProxy['queryPrefix'] = value;

 /**
  * Matches if the query segment of the URL ends with a specified string.
  */
 String get querySuffix => jsProxy['querySuffix'];
 set querySuffix(String value) => jsProxy['querySuffix'] = value;

 /**
  * Matches if the URL (without fragment identifier) contains a specified
  * string. Port numbers are stripped from the URL if they match the default
  * port number.
  */
 String get urlContains => jsProxy['urlContains'];
 set urlContains(String value) => jsProxy['urlContains'] = value;

 /**
  * Matches if the URL (without fragment identifier) is equal to a specified
  * string. Port numbers are stripped from the URL if they match the default
  * port number.
  */
 String get urlEquals => jsProxy['urlEquals'];
 set urlEquals(String value) => jsProxy['urlEquals'] = value;

 /**
  * Matches if the URL (without fragment identifier) matches a specified
  * regular expression. Port numbers are stripped from the URL if they match
  * the default port number. The regular expressions use the [RE2
  * syntax](http://code.google.com/p/re2/wiki/Syntax).
  */
 String get urlMatches => jsProxy['urlMatches'];
 set urlMatches(String value) => jsProxy['urlMatches'] = value;

 /**
  * Matches if the URL without query segment and fragment identifier matches a
  * specified regular expression. Port numbers are stripped from the URL if
  * they match the default port number. The regular expressions use the [RE2
  * syntax](http://code.google.com/p/re2/wiki/Syntax).
  */
 String get originAndPathMatches => jsProxy['originAndPathMatches'];
 set originAndPathMatches(String value) => jsProxy['originAndPathMatches'] = value;

 /**
  * Matches if the URL (without fragment identifier) starts with a specified
  * string. Port numbers are stripped from the URL if they match the default
  * port number.
  */
 String get urlPrefix => jsProxy['urlPrefix'];
 set urlPrefix(String value) => jsProxy['urlPrefix'] = value;

 /**
  * Matches if the URL (without fragment identifier) ends with a specified
  * string. Port numbers are stripped from the URL if they match the default
  * port number.
  */
 String get urlSuffix => jsProxy['urlSuffix'];
 set urlSuffix(String value) => jsProxy['urlSuffix'] = value;

 /**
  * Matches if the scheme of the URL is equal to any of the schemes specified
  * in the array.
  */
 List<String> get schemes => listify(jsProxy['schemes']);
 set schemes(List<String> value) => jsProxy['schemes'] = jsify(value);

 /**
  * Matches if the port of the URL is contained in any of the specified port
  * lists. For example `[80, 443, [1000, 1200]]` matches all requests on port
  * 80, 443 and in the range 1000-1200.
  */
 List<dynamic> get ports => listify(jsProxy['ports']);
 set ports(List<dynamic> value) => jsProxy['ports'] = jsify(value);
}

Extends

ChromeObject > UrlFilter

Constructors

new UrlFilter({String hostContains, String hostEquals, String hostPrefix, String hostSuffix, String pathContains, String pathEquals, String pathPrefix, String pathSuffix, String queryContains, String queryEquals, String queryPrefix, String querySuffix, String urlContains, String urlEquals, String urlMatches, String originAndPathMatches, String urlPrefix, String urlSuffix, List<String> schemes, List<dynamic> ports}) #

Create a new instance of a ChromeObject, which creates and delegates to a JsObject proxy.

docs inherited from ChromeObject
UrlFilter({String hostContains, String hostEquals, String hostPrefix, String hostSuffix, String pathContains, String pathEquals, String pathPrefix, String pathSuffix, String queryContains, String queryEquals, String queryPrefix, String querySuffix, String urlContains, String urlEquals, String urlMatches, String originAndPathMatches, String urlPrefix, String urlSuffix, List<String> schemes, List<dynamic> ports}) {
 if (hostContains != null) this.hostContains = hostContains;
 if (hostEquals != null) this.hostEquals = hostEquals;
 if (hostPrefix != null) this.hostPrefix = hostPrefix;
 if (hostSuffix != null) this.hostSuffix = hostSuffix;
 if (pathContains != null) this.pathContains = pathContains;
 if (pathEquals != null) this.pathEquals = pathEquals;
 if (pathPrefix != null) this.pathPrefix = pathPrefix;
 if (pathSuffix != null) this.pathSuffix = pathSuffix;
 if (queryContains != null) this.queryContains = queryContains;
 if (queryEquals != null) this.queryEquals = queryEquals;
 if (queryPrefix != null) this.queryPrefix = queryPrefix;
 if (querySuffix != null) this.querySuffix = querySuffix;
 if (urlContains != null) this.urlContains = urlContains;
 if (urlEquals != null) this.urlEquals = urlEquals;
 if (urlMatches != null) this.urlMatches = urlMatches;
 if (originAndPathMatches != null) this.originAndPathMatches = originAndPathMatches;
 if (urlPrefix != null) this.urlPrefix = urlPrefix;
 if (urlSuffix != null) this.urlSuffix = urlSuffix;
 if (schemes != null) this.schemes = schemes;
 if (ports != null) this.ports = ports;
}

new UrlFilter.fromProxy(JsObject jsProxy) #

Create a new instance of a ChromeObject, which delegates to the given JsObject proxy.

docs inherited from ChromeObject
UrlFilter.fromProxy(JsObject jsProxy): super.fromProxy(jsProxy);

Properties

String hostContains #

Matches if the host name of the URL contains a specified string. To test whether a host name component has a prefix 'foo', use hostContains: '.foo'. This matches 'www.foobar.com' and 'foo.com', because an implicit dot is added at the beginning of the host name. Similarly, hostContains can be used to match against component suffix ('foo.') and to exactly match against components ('.foo.'). Suffix- and exact-matching for the last components need to be done separately using hostSuffix, because no implicit dot is added at the end of the host name.

String get hostContains => jsProxy['hostContains'];
set hostContains(String value) => jsProxy['hostContains'] = value;

String hostEquals #

Matches if the host name of the URL is equal to a specified string.

String get hostEquals => jsProxy['hostEquals'];
set hostEquals(String value) => jsProxy['hostEquals'] = value;

String hostPrefix #

Matches if the host name of the URL starts with a specified string.

String get hostPrefix => jsProxy['hostPrefix'];
set hostPrefix(String value) => jsProxy['hostPrefix'] = value;

String hostSuffix #

Matches if the host name of the URL ends with a specified string.

String get hostSuffix => jsProxy['hostSuffix'];
set hostSuffix(String value) => jsProxy['hostSuffix'] = value;

final jsProxy #

inherited from ChromeObject
final dynamic jsProxy

String originAndPathMatches #

Matches if the URL without query segment and fragment identifier matches a specified regular expression. Port numbers are stripped from the URL if they match the default port number. The regular expressions use the RE2 syntax.

String get originAndPathMatches => jsProxy['originAndPathMatches'];
set originAndPathMatches(String value) => jsProxy['originAndPathMatches'] = value;

String pathContains #

Matches if the path segment of the URL contains a specified string.

String get pathContains => jsProxy['pathContains'];
set pathContains(String value) => jsProxy['pathContains'] = value;

String pathEquals #

Matches if the path segment of the URL is equal to a specified string.

String get pathEquals => jsProxy['pathEquals'];
set pathEquals(String value) => jsProxy['pathEquals'] = value;

String pathPrefix #

Matches if the path segment of the URL starts with a specified string.

String get pathPrefix => jsProxy['pathPrefix'];
set pathPrefix(String value) => jsProxy['pathPrefix'] = value;

String pathSuffix #

Matches if the path segment of the URL ends with a specified string.

String get pathSuffix => jsProxy['pathSuffix'];
set pathSuffix(String value) => jsProxy['pathSuffix'] = value;

List<dynamic> ports #

Matches if the port of the URL is contained in any of the specified port lists. For example [80, 443, [1000, 1200]] matches all requests on port 80, 443 and in the range 1000-1200.

List<dynamic> get ports => listify(jsProxy['ports']);
set ports(List<dynamic> value) => jsProxy['ports'] = jsify(value);

String queryContains #

Matches if the query segment of the URL contains a specified string.

String get queryContains => jsProxy['queryContains'];
set queryContains(String value) => jsProxy['queryContains'] = value;

String queryEquals #

Matches if the query segment of the URL is equal to a specified string.

String get queryEquals => jsProxy['queryEquals'];
set queryEquals(String value) => jsProxy['queryEquals'] = value;

String queryPrefix #

Matches if the query segment of the URL starts with a specified string.

String get queryPrefix => jsProxy['queryPrefix'];
set queryPrefix(String value) => jsProxy['queryPrefix'] = value;

String querySuffix #

Matches if the query segment of the URL ends with a specified string.

String get querySuffix => jsProxy['querySuffix'];
set querySuffix(String value) => jsProxy['querySuffix'] = value;

List<String> schemes #

Matches if the scheme of the URL is equal to any of the schemes specified in the array.

List<String> get schemes => listify(jsProxy['schemes']);
set schemes(List<String> value) => jsProxy['schemes'] = jsify(value);

String urlContains #

Matches if the URL (without fragment identifier) contains a specified string. Port numbers are stripped from the URL if they match the default port number.

String get urlContains => jsProxy['urlContains'];
set urlContains(String value) => jsProxy['urlContains'] = value;

String urlEquals #

Matches if the URL (without fragment identifier) is equal to a specified string. Port numbers are stripped from the URL if they match the default port number.

String get urlEquals => jsProxy['urlEquals'];
set urlEquals(String value) => jsProxy['urlEquals'] = value;

String urlMatches #

Matches if the URL (without fragment identifier) matches a specified regular expression. Port numbers are stripped from the URL if they match the default port number. The regular expressions use the RE2 syntax.

String get urlMatches => jsProxy['urlMatches'];
set urlMatches(String value) => jsProxy['urlMatches'] = value;

String urlPrefix #

Matches if the URL (without fragment identifier) starts with a specified string. Port numbers are stripped from the URL if they match the default port number.

String get urlPrefix => jsProxy['urlPrefix'];
set urlPrefix(String value) => jsProxy['urlPrefix'] = value;

String urlSuffix #

Matches if the URL (without fragment identifier) ends with a specified string. Port numbers are stripped from the URL if they match the default port number.

String get urlSuffix => jsProxy['urlSuffix'];
set urlSuffix(String value) => jsProxy['urlSuffix'] = value;

Methods

JsObject toJs() #

inherited from ChromeObject
JsObject toJs() => jsProxy;

String toString() #

inherited from ChromeObject

Returns a string representation of this object.

docs inherited from Object
String toString() => jsProxy.toString();