Index: chrome/common/extensions/docs/events.html |
diff --git a/chrome/common/extensions/docs/events.html b/chrome/common/extensions/docs/events.html |
index 3b67318fb81be8276a9357487a03f478637dee32..bc3dc3198df9a062a2cd040a4c26004d7257befa 100644 |
--- a/chrome/common/extensions/docs/events.html |
+++ b/chrome/common/extensions/docs/events.html |
@@ -18,7 +18,7 @@ |
<script type="text/javascript" src="js/api_page_generator.js"></script> |
<script type="text/javascript" src="js/bootstrap.js"></script> |
<script type="text/javascript" src="js/sidebar.js"></script> |
- <title>Events - Google Chrome Extensions - Google Code</title></head> |
+ <meta name="description" content="Documentation for the chrome.events module, which is part of the Google Chrome extension APIs."><title>chrome.events - Google Chrome Extensions - Google Code</title></head> |
<body> <div id="devModeWarning" class="displayModeWarning"> |
You are viewing extension docs in chrome via the 'file:' scheme: are you expecting to see local changes when you refresh? You'll need run chrome with --allow-file-access-from-files. |
</div> |
@@ -185,9 +185,79 @@ |
</script> |
<div class="g-unit" id="gc-pagecontent"> |
<div id="pageTitle"> |
- <h1 class="page_title">Events</h1> |
+ <h1 class="page_title">chrome.events</h1> |
</div> |
<!-- TABLE OF CONTENTS --> |
+ <div id="toc"> |
+ <h2>Contents</h2> |
+ <ol> |
+ <li> |
+ <a href="#H2-0"> |
+Methods |
+</a> |
+ <ol> |
+ </ol> |
+ </li><li> |
+ <a href="#declarative">Declarative Event Handlers</a> |
+ <ol> |
+ <li> |
+ <a href="#rules">Rules</a> |
+ </li><li> |
+ <a href="#eventobjects">Event objects</a> |
+ </li><li> |
+ <a href="#addingrules">Adding rules</a> |
+ </li><li> |
+ <a href="#removingrules">Removing rules</a> |
+ </li><li> |
+ <a href="#retrievingrules">Retrieving rules</a> |
+ </li> |
+ </ol> |
+ </li> |
+ <li> |
+ <a href="#apiReference">API reference: chrome.events</a> |
+ <ol> |
+ <li> |
+ <a href="#types">Types</a> |
+ <ol> |
+ <li> |
+ <a href="#type-Event">Event</a> |
+ <ol> |
+ <li> |
+ <a href="#global-Event-methods">Methods</a> |
+ <ol> |
+ <li> |
+ <a href="#method-Event-addListener">addListener</a> |
+ </li><li> |
+ <a href="#method-Event-addRules">addRules</a> |
+ </li><li> |
+ <a href="#method-Event-getRules">getRules</a> |
+ </li><li> |
+ <a href="#method-Event-hasListener">hasListener</a> |
+ </li><li> |
+ <a href="#method-Event-hasListeners">hasListeners</a> |
+ </li><li> |
+ <a href="#method-Event-removeListener">removeListener</a> |
+ </li><li> |
+ <a href="#method-Event-removeRules">removeRules</a> |
+ </li> |
+ </ol> |
+ </li> |
+ </ol> |
+ </li><li> |
+ <a href="#type-Rule">Rule</a> |
+ <ol> |
+ </ol> |
+ </li><li> |
+ <a href="#type-UrlFilter">UrlFilter</a> |
+ <ol> |
+ </ol> |
+ </li> |
+ </ol> |
+ </li> |
+ </ol> |
+ </li> |
+ </ol> |
+ </div> |
<!-- /TABLE OF CONTENTS --> |
<!-- Standard content lead-in for experimental API pages --> |
<!-- STATIC CONTENT PLACEHOLDER --> |
@@ -220,7 +290,7 @@ you can see that the function has a single parameter: |
a <a href="tabs.html#type-Tab">Tab</a> object |
that has details about the newly created tab. |
</p> |
-<h2> |
+<a name="H2-0"></a><h2> |
Methods |
</h2> |
<p> |
@@ -231,9 +301,1095 @@ void removeListener(function callback(...)) |
bool hasListener(function callback(...)) |
</pre> |
<!-- [PENDING: explain removeListener and hasListener] --> |
+<h2 id="declarative">Declarative Event Handlers</h2> |
+<p> |
+The declarative event handlers provide a means to define rules consisting of |
+declarative conditions and actions. Conditions are evaluated in the browser |
+rather than the JavaScript engine which reduces roundtrip latencies and allows |
+for very high efficiency. |
+</p> |
+<p>Declarative event handlers are used for example in the <a href="declarativeWebRequest.html">Declarative Web Request API</a> and possibly |
+further extension APIs in the future. This page describes the underlying |
+concepts of all declarative event handlers. |
+</p> |
+<h3 id="rules">Rules</h3> |
+<p>The simplest possible rule consists of one or more conditions and one or more |
+actions:</p> |
+<pre>var rule = { |
+ conditions: [ /* my conditions */ ], |
+ actions: [ /* my actions */ ] |
+}; |
+</pre> |
+<p>If any of the conditions is fulfilled, all actions are executed.</p> |
+<p>In addition to conditions and actions you may give each rule an identifier, |
+which simplifies unregistering previously registered rules, and a priority to |
+define precedences among rules. Priorities are only considered if rules conflict |
+each other or need to be executed in a specific order.</p> |
+<pre>var rule = { |
+ id: "my rule", // optional, will be generated if not set. |
+ priority: 100, // optional, defaults to 100. |
+ conditions: [ /* my conditions */ ], |
+ actions: [ /* my actions */ ] |
+}; |
+</pre> |
+<h3 id="eventobjects">Event objects</h3> |
+<p> |
+<a href="events.html">Event objects</a> may support rules. These event objects |
+don't call a callback function when events happer but test whether any |
+registered rule has at least one fulfilled condition and execute the actions |
+associated with this rule. Event objects supporting the declarative API have |
+three relevant methods: <a href="#method-addRules"><code>addRules()</code></a>, |
+<a href="#method-removeRules"><code>removeRules()</code></a>, and |
+<a href="#method-getRules"><code>getRules()</code></a>. |
+</p> |
+<h3 id="addingrules">Adding rules</h3> |
+<p> |
+To add rules call the <code>addRules()</code> function of the event object. It |
+takes an array of rule instances as its first parameter and a callback function |
+that is called on completion. |
+</p> |
+<pre>var rule_list = [rule1, rule2, ...]; |
+function addRules(rule_list, function callback(details) {...}); |
+</pre> |
+<p> |
+If the rules were inserted successfully, the <code>details</code> parameter |
+contains an array of inserted rules appearing in the same order as in the passed |
+<code>rule_list</code> where the optional parameters <code>id</code> and |
+<code>priority</code> were filled with the generated values. If any rule is |
+invalid, e.g., because it contained an invalid condition or action, none of the |
+rules are added and the <a href="extension.html#property-lastError">lastError</a> variable is set when |
+the callback function is called. Each rule in <code>rule_list</code> must |
+contain a unique identifier that is not currently used by another rule or an |
+empty identifier. |
+</p> |
+<h3 id="removingrules">Removing rules</h3> |
+<p> |
+To remove rules call the <code>removeRules()</code> function. It accepts an |
+optional array of rule identifiers as its first parameter and a callback |
+function as its second parameter. |
+</p> |
+<pre>var rule_ids = ["id1", "id2", ...]; |
+function removeRules(rule_ids, function callback() {...}); |
+</pre> |
+<p> |
+If <code>rule_ids</code> is an array of identifiers, all rules having |
+identifiers listed in the array are removed. If <code>rule_ids</code> lists an |
+identifier, that is unknown, this identifier is silently ignored. If |
+<code>rule_ids</code> is <code>undefined</code>, all registered rules of this |
+extension are removed. The <code>callback()</code> function is called when the |
+rules were removed. |
+</p> |
+<h3 id="retrievingrules">Retrieving rules</h3> |
+<p> |
+To retrieve a list of currently registered rules, call the |
+<code>getRules()</code> function. It accepts an optional array of rule |
+identifiers with the same semantics as <code>removeRules</code> and a callback |
+function. |
+</p><p> |
+</p><pre>var rule_ids = ["id1", "id2", ...]; |
+function getRules(rule_ids, function callback(details) {...}); |
+</pre> |
+<p> |
+The <code>details</code> parameter passed to the <code>calback()</code> function |
+refers to an array of rules including filled optional parameters. |
+</p> |
</div> |
<!-- API PAGE --> |
- <!-- /apiPage --> |
+ <div class="apiPage"> |
+ <a name="apiReference"></a> |
+ <h2>API reference: chrome.events</h2> |
+ <!-- PROPERTIES --> |
+ <!-- /apiGroup --> |
+ <!-- METHODS --> |
+ <!-- /apiGroup --> |
+ <!-- EVENTS --> |
+ <!-- /apiGroup --> |
+ <!-- TYPES --> |
+ <div class="apiGroup"> |
+ <a name="types"></a> |
+ <h3 id="types">Types</h3> |
+ <!-- iterates over all types --> |
+ <div class="apiItem"> |
+ <a name="type-Event"></a> |
+ <h4>Event</h4> |
+ <div> |
+ <dt> |
+ <em> |
+ <!-- TYPE --> |
+ <div style="display:inline"> |
+ ( |
+ <span id="typeTemplate"> |
+ <span> |
+ <span>object</span> |
+ </span> |
+ </span> |
+ ) |
+ </div> |
+ </em> |
+ </dt> |
+ <dd>An object which allows the addition and removal of listeners for a Chrome event.</dd> |
+ <!-- OBJECT PROPERTIES --> |
+ <!-- OBJECT METHODS --> |
+ <dd> |
+ <div class="apiGroup"> |
+ <a name="global-Event-methods"></a> |
+ <h3>Methods of Event</h3> |
+ <!-- iterates over all functions --> |
+ <div class="apiItem"> |
+ <a name="method-Event-addListener"></a> <!-- method-anchor --> |
+ <h4>addListener</h4> |
+ <div class="summary"> |
+ <!-- Note: intentionally longer 80 columns --> |
+ <span>event.addListener</span>()</div> |
+ <div class="description"> |
+ <!-- PARAMETERS --> |
+ <dl> |
+ </dl> |
+ <!-- RETURNS --> |
+ <dl> |
+ </dl> |
+ <!-- CALLBACK --> |
+ <!-- MIN_VERSION --> |
+ </div> <!-- /description --> |
+ </div><div class="apiItem"> |
+ <a name="method-Event-addRules"></a> <!-- method-anchor --> |
+ <h4>addRules</h4> |
+ <div class="summary"> |
+ <!-- Note: intentionally longer 80 columns --> |
+ <span>event.addRules</span>(<span class="null"><span>array of Rule</span> |
+ <var><span>rules</span></var></span><span class="optional"><span>, </span><span>function</span> |
+ <var><span>callback</span></var></span>)</div> |
+ <div class="description"> |
+ <p>Registers rules to handle events. Note that you cannot call this function as <code>chrome.declarative.addRules(...)</code>. Instead a function of this signature is provided for event objects supporting the declarative API such as <code>chrome.declarativeWebRequest.onRequest</code>.</p> |
+ <!-- PARAMETERS --> |
+ <h4>Parameters</h4> |
+ <dl> |
+ <div> |
+ <div> |
+ <dt> |
+ <var>rules</var> |
+ <em> |
+ <!-- TYPE --> |
+ <div style="display:inline"> |
+ ( |
+ <span id="typeTemplate"> |
+ <span> |
+ <span> |
+ array of <span><span> |
+ <span> |
+ <a href="events.html#type-Rule">Rule</a> |
+ </span> |
+ </span></span> |
+ </span> |
+ </span> |
+ </span> |
+ ) |
+ </div> |
+ </em> |
+ </dt> |
+ <dd>Rules to be registered. These do not replace previously registered rules.</dd> |
+ <!-- OBJECT PROPERTIES --> |
+ <!-- OBJECT METHODS --> |
+ <!-- OBJECT EVENT FIELDS --> |
+ <!-- FUNCTION PARAMETERS --> |
+ </div> |
+ </div><div> |
+ <div> |
+ <dt> |
+ <var>callback</var> |
+ <em> |
+ <!-- TYPE --> |
+ <div style="display:inline"> |
+ ( |
+ <span class="optional">optional</span> |
+ <span id="typeTemplate"> |
+ <span> |
+ <span>function</span> |
+ </span> |
+ </span> |
+ ) |
+ </div> |
+ </em> |
+ </dt> |
+ <dd>Called with registered rules.</dd> |
+ <!-- OBJECT PROPERTIES --> |
+ <!-- OBJECT METHODS --> |
+ <!-- OBJECT EVENT FIELDS --> |
+ <!-- FUNCTION PARAMETERS --> |
+ </div> |
+ </div> |
+ </dl> |
+ <!-- RETURNS --> |
+ <dl> |
+ </dl> |
+ <!-- CALLBACK --> |
+ <div> |
+ <div> |
+ <h4>Callback function</h4> |
+ <p> |
+ If you specify the <em>callback</em> parameter, it should |
+ specify a function that looks like this: |
+ </p> |
+ <!-- Note: intentionally longer 80 columns --> |
+ <pre>function(<span>array of Rule rules</span>) <span class="subdued">{...}</span>;</pre> |
+ <dl> |
+ <div> |
+ <div> |
+ <dt> |
+ <var>rules</var> |
+ <em> |
+ <!-- TYPE --> |
+ <div style="display:inline"> |
+ ( |
+ <span id="typeTemplate"> |
+ <span> |
+ <span> |
+ array of <span><span> |
+ <span> |
+ <a href="events.html#type-Rule">Rule</a> |
+ </span> |
+ </span></span> |
+ </span> |
+ </span> |
+ </span> |
+ ) |
+ </div> |
+ </em> |
+ </dt> |
+ <dd>Rules that were registered, the optional parameters are filled with values.</dd> |
+ <!-- OBJECT PROPERTIES --> |
+ <!-- OBJECT METHODS --> |
+ <!-- OBJECT EVENT FIELDS --> |
+ <!-- FUNCTION PARAMETERS --> |
+ </div> |
+ </div> |
+ </dl> |
+ </div> |
+ </div> |
+ <!-- MIN_VERSION --> |
+ </div> <!-- /description --> |
+ </div><div class="apiItem"> |
+ <a name="method-Event-getRules"></a> <!-- method-anchor --> |
+ <h4>getRules</h4> |
+ <div class="summary"> |
+ <!-- Note: intentionally longer 80 columns --> |
+ <span>event.getRules</span>(<span class="optional"><span>array of string</span> |
+ <var><span>ruleIdentifiers</span></var></span><span class="null"><span>, </span><span>function</span> |
+ <var><span>callback</span></var></span>)</div> |
+ <div class="description"> |
+ <p>Returns currently registered rules. Note that you cannot call this function as <code>chrome.declarative.getRules(...)</code>. Instead a function of this signature is provided for event objects supporting the declarative API such as <code>chrome.declarativeWebRequest.onRequest</code>.</p> |
+ <!-- PARAMETERS --> |
+ <h4>Parameters</h4> |
+ <dl> |
+ <div> |
+ <div> |
+ <dt> |
+ <var>ruleIdentifiers</var> |
+ <em> |
+ <!-- TYPE --> |
+ <div style="display:inline"> |
+ ( |
+ <span class="optional">optional</span> |
+ <span id="typeTemplate"> |
+ <span> |
+ <span> |
+ array of <span><span> |
+ <span> |
+ <span>string</span> |
+ </span> |
+ </span></span> |
+ </span> |
+ </span> |
+ </span> |
+ ) |
+ </div> |
+ </em> |
+ </dt> |
+ <dd>If an array is passed, only rules with identifiers contained in this array are returned.</dd> |
+ <!-- OBJECT PROPERTIES --> |
+ <!-- OBJECT METHODS --> |
+ <!-- OBJECT EVENT FIELDS --> |
+ <!-- FUNCTION PARAMETERS --> |
+ </div> |
+ </div><div> |
+ <div> |
+ <dt> |
+ <var>callback</var> |
+ <em> |
+ <!-- TYPE --> |
+ <div style="display:inline"> |
+ ( |
+ <span id="typeTemplate"> |
+ <span> |
+ <span>function</span> |
+ </span> |
+ </span> |
+ ) |
+ </div> |
+ </em> |
+ </dt> |
+ <dd>Called with registered rules.</dd> |
+ <!-- OBJECT PROPERTIES --> |
+ <!-- OBJECT METHODS --> |
+ <!-- OBJECT EVENT FIELDS --> |
+ <!-- FUNCTION PARAMETERS --> |
+ </div> |
+ </div> |
+ </dl> |
+ <!-- RETURNS --> |
+ <dl> |
+ </dl> |
+ <!-- CALLBACK --> |
+ <div> |
+ <div> |
+ <h4>Callback function</h4> |
+ <p> |
+ The callback <em>parameter</em> should specify a function |
+ that looks like this: |
+ </p> |
+ <!-- Note: intentionally longer 80 columns --> |
+ <pre>function(<span>array of Rule rules</span>) <span class="subdued">{...}</span>;</pre> |
+ <dl> |
+ <div> |
+ <div> |
+ <dt> |
+ <var>rules</var> |
+ <em> |
+ <!-- TYPE --> |
+ <div style="display:inline"> |
+ ( |
+ <span id="typeTemplate"> |
+ <span> |
+ <span> |
+ array of <span><span> |
+ <span> |
+ <a href="events.html#type-Rule">Rule</a> |
+ </span> |
+ </span></span> |
+ </span> |
+ </span> |
+ </span> |
+ ) |
+ </div> |
+ </em> |
+ </dt> |
+ <dd>Rules that were registered, the optional parameters are filled with values.</dd> |
+ <!-- OBJECT PROPERTIES --> |
+ <!-- OBJECT METHODS --> |
+ <!-- OBJECT EVENT FIELDS --> |
+ <!-- FUNCTION PARAMETERS --> |
+ </div> |
+ </div> |
+ </dl> |
+ </div> |
+ </div> |
+ <!-- MIN_VERSION --> |
+ </div> <!-- /description --> |
+ </div><div class="apiItem"> |
+ <a name="method-Event-hasListener"></a> <!-- method-anchor --> |
+ <h4>hasListener</h4> |
+ <div class="summary"> |
+ <!-- Note: intentionally longer 80 columns --> |
+ <span>event.hasListener</span>()</div> |
+ <div class="description"> |
+ <!-- PARAMETERS --> |
+ <dl> |
+ </dl> |
+ <!-- RETURNS --> |
+ <dl> |
+ </dl> |
+ <!-- CALLBACK --> |
+ <!-- MIN_VERSION --> |
+ </div> <!-- /description --> |
+ </div><div class="apiItem"> |
+ <a name="method-Event-hasListeners"></a> <!-- method-anchor --> |
+ <h4>hasListeners</h4> |
+ <div class="summary"> |
+ <!-- Note: intentionally longer 80 columns --> |
+ <span>event.hasListeners</span>()</div> |
+ <div class="description"> |
+ <!-- PARAMETERS --> |
+ <dl> |
+ </dl> |
+ <!-- RETURNS --> |
+ <dl> |
+ </dl> |
+ <!-- CALLBACK --> |
+ <!-- MIN_VERSION --> |
+ </div> <!-- /description --> |
+ </div><div class="apiItem"> |
+ <a name="method-Event-removeListener"></a> <!-- method-anchor --> |
+ <h4>removeListener</h4> |
+ <div class="summary"> |
+ <!-- Note: intentionally longer 80 columns --> |
+ <span>event.removeListener</span>()</div> |
+ <div class="description"> |
+ <!-- PARAMETERS --> |
+ <dl> |
+ </dl> |
+ <!-- RETURNS --> |
+ <dl> |
+ </dl> |
+ <!-- CALLBACK --> |
+ <!-- MIN_VERSION --> |
+ </div> <!-- /description --> |
+ </div><div class="apiItem"> |
+ <a name="method-Event-removeRules"></a> <!-- method-anchor --> |
+ <h4>removeRules</h4> |
+ <div class="summary"> |
+ <!-- Note: intentionally longer 80 columns --> |
+ <span>event.removeRules</span>(<span class="optional"><span>array of string</span> |
+ <var><span>ruleIdentifiers</span></var></span><span class="optional"><span>, </span><span>function</span> |
+ <var><span>callback</span></var></span>)</div> |
+ <div class="description"> |
+ <p>Unregisters currently registered rules. Note that you cannot call this function as <code>chrome.declarative.removeRules(...)</code>. Instead a function of this signature is provided for event objects supporting the declarative API such as <code>chrome.declarativeWebRequest.onRequest</code>.</p> |
+ <!-- PARAMETERS --> |
+ <h4>Parameters</h4> |
+ <dl> |
+ <div> |
+ <div> |
+ <dt> |
+ <var>ruleIdentifiers</var> |
+ <em> |
+ <!-- TYPE --> |
+ <div style="display:inline"> |
+ ( |
+ <span class="optional">optional</span> |
+ <span id="typeTemplate"> |
+ <span> |
+ <span> |
+ array of <span><span> |
+ <span> |
+ <span>string</span> |
+ </span> |
+ </span></span> |
+ </span> |
+ </span> |
+ </span> |
+ ) |
+ </div> |
+ </em> |
+ </dt> |
+ <dd>If an array is passed, only rules with identifiers contained in this array are unregistered.</dd> |
+ <!-- OBJECT PROPERTIES --> |
+ <!-- OBJECT METHODS --> |
+ <!-- OBJECT EVENT FIELDS --> |
+ <!-- FUNCTION PARAMETERS --> |
+ </div> |
+ </div><div> |
+ <div> |
+ <dt> |
+ <var>callback</var> |
+ <em> |
+ <!-- TYPE --> |
+ <div style="display:inline"> |
+ ( |
+ <span class="optional">optional</span> |
+ <span id="typeTemplate"> |
+ <span> |
+ <span>function</span> |
+ </span> |
+ </span> |
+ ) |
+ </div> |
+ </em> |
+ </dt> |
+ <dd>Called when rules were unregistered.</dd> |
+ <!-- OBJECT PROPERTIES --> |
+ <!-- OBJECT METHODS --> |
+ <!-- OBJECT EVENT FIELDS --> |
+ <!-- FUNCTION PARAMETERS --> |
+ </div> |
+ </div> |
+ </dl> |
+ <!-- RETURNS --> |
+ <dl> |
+ </dl> |
+ <!-- CALLBACK --> |
+ <div> |
+ <div> |
+ <h4>Callback function</h4> |
+ <p> |
+ If you specify the <em>callback</em> parameter, it should |
+ specify a function that looks like this: |
+ </p> |
+ <!-- Note: intentionally longer 80 columns --> |
+ <pre>function(<span></span>) <span class="subdued">{...}</span>;</pre> |
+ <dl> |
+ </dl> |
+ </div> |
+ </div> |
+ <!-- MIN_VERSION --> |
+ </div> <!-- /description --> |
+ </div> <!-- /apiItem --> |
+ </div> |
+ </dd> |
+ <!-- OBJECT EVENT FIELDS --> |
+ <!-- FUNCTION PARAMETERS --> |
+ </div> |
+ </div><div class="apiItem"> |
+ <a name="type-Rule"></a> |
+ <h4>Rule</h4> |
+ <div> |
+ <dt> |
+ <em> |
+ <!-- TYPE --> |
+ <div style="display:inline"> |
+ ( |
+ <span id="typeTemplate"> |
+ <span> |
+ <span>object</span> |
+ </span> |
+ </span> |
+ ) |
+ </div> |
+ </em> |
+ </dt> |
+ <dd>Description of a declarative rule for handling events.</dd> |
+ <!-- OBJECT PROPERTIES --> |
+ <dd> |
+ <dl> |
+ <div> |
+ <div> |
+ <dt> |
+ <var>id</var> |
+ <em> |
+ <!-- TYPE --> |
+ <div style="display:inline"> |
+ ( |
+ <span class="optional">optional</span> |
+ <span id="typeTemplate"> |
+ <span> |
+ <span>string</span> |
+ </span> |
+ </span> |
+ ) |
+ </div> |
+ </em> |
+ </dt> |
+ <dd>Optional identifier that allows referencing this rule.</dd> |
+ <!-- OBJECT PROPERTIES --> |
+ <!-- OBJECT METHODS --> |
+ <!-- OBJECT EVENT FIELDS --> |
+ <!-- FUNCTION PARAMETERS --> |
+ </div> |
+ </div><div> |
+ <div> |
+ <dt> |
+ <var>conditions</var> |
+ <em> |
+ <!-- TYPE --> |
+ <div style="display:inline"> |
+ ( |
+ <span id="typeTemplate"> |
+ <span> |
+ <span> |
+ array of <span><span> |
+ <span> |
+ <span>any</span> |
+ </span> |
+ </span></span> |
+ </span> |
+ </span> |
+ </span> |
+ ) |
+ </div> |
+ </em> |
+ </dt> |
+ <dd>List of conditions that can trigger the actions.</dd> |
+ <!-- OBJECT PROPERTIES --> |
+ <!-- OBJECT METHODS --> |
+ <!-- OBJECT EVENT FIELDS --> |
+ <!-- FUNCTION PARAMETERS --> |
+ </div> |
+ </div><div> |
+ <div> |
+ <dt> |
+ <var>actions</var> |
+ <em> |
+ <!-- TYPE --> |
+ <div style="display:inline"> |
+ ( |
+ <span id="typeTemplate"> |
+ <span> |
+ <span> |
+ array of <span><span> |
+ <span> |
+ <span>any</span> |
+ </span> |
+ </span></span> |
+ </span> |
+ </span> |
+ </span> |
+ ) |
+ </div> |
+ </em> |
+ </dt> |
+ <dd>List of actions that are triggered if one of the condtions is fulfilled.</dd> |
+ <!-- OBJECT PROPERTIES --> |
+ <!-- OBJECT METHODS --> |
+ <!-- OBJECT EVENT FIELDS --> |
+ <!-- FUNCTION PARAMETERS --> |
+ </div> |
+ </div><div> |
+ <div> |
+ <dt> |
+ <var>priority</var> |
+ <em> |
+ <!-- TYPE --> |
+ <div style="display:inline"> |
+ ( |
+ <span class="optional">optional</span> |
+ <span id="typeTemplate"> |
+ <span> |
+ <span>integer</span> |
+ </span> |
+ </span> |
+ ) |
+ </div> |
+ </em> |
+ </dt> |
+ <dd>Optional priority of this rule. Defaults to 100.</dd> |
+ <!-- OBJECT PROPERTIES --> |
+ <!-- OBJECT METHODS --> |
+ <!-- OBJECT EVENT FIELDS --> |
+ <!-- FUNCTION PARAMETERS --> |
+ </div> |
+ </div> |
+ </dl> |
+ </dd> |
+ <!-- OBJECT METHODS --> |
+ <!-- OBJECT EVENT FIELDS --> |
+ <!-- FUNCTION PARAMETERS --> |
+ </div> |
+ </div><div class="apiItem"> |
+ <a name="type-UrlFilter"></a> |
+ <h4>UrlFilter</h4> |
+ <div> |
+ <dt> |
+ <em> |
+ <!-- TYPE --> |
+ <div style="display:inline"> |
+ ( |
+ <span id="typeTemplate"> |
+ <span> |
+ <span>object</span> |
+ </span> |
+ </span> |
+ ) |
+ </div> |
+ </em> |
+ </dt> |
+ <dd>Filters URLs for various criteria</dd> |
+ <!-- OBJECT PROPERTIES --> |
+ <dd> |
+ <dl> |
+ <div> |
+ <div> |
+ <dt> |
+ <var>hostContains</var> |
+ <em> |
+ <!-- TYPE --> |
+ <div style="display:inline"> |
+ ( |
+ <span class="optional">optional</span> |
+ <span id="typeTemplate"> |
+ <span> |
+ <span>string</span> |
+ </span> |
+ </span> |
+ ) |
+ </div> |
+ </em> |
+ </dt> |
+ <dd>Matches if the host name of the URL contains a specified string.</dd> |
+ <!-- OBJECT PROPERTIES --> |
+ <!-- OBJECT METHODS --> |
+ <!-- OBJECT EVENT FIELDS --> |
+ <!-- FUNCTION PARAMETERS --> |
+ </div> |
+ </div><div> |
+ <div> |
+ <dt> |
+ <var>hostEquals</var> |
+ <em> |
+ <!-- TYPE --> |
+ <div style="display:inline"> |
+ ( |
+ <span class="optional">optional</span> |
+ <span id="typeTemplate"> |
+ <span> |
+ <span>string</span> |
+ </span> |
+ </span> |
+ ) |
+ </div> |
+ </em> |
+ </dt> |
+ <dd>Matches if the host name of the URL is equal to a specified string.</dd> |
+ <!-- OBJECT PROPERTIES --> |
+ <!-- OBJECT METHODS --> |
+ <!-- OBJECT EVENT FIELDS --> |
+ <!-- FUNCTION PARAMETERS --> |
+ </div> |
+ </div><div> |
+ <div> |
+ <dt> |
+ <var>hostPrefix</var> |
+ <em> |
+ <!-- TYPE --> |
+ <div style="display:inline"> |
+ ( |
+ <span class="optional">optional</span> |
+ <span id="typeTemplate"> |
+ <span> |
+ <span>string</span> |
+ </span> |
+ </span> |
+ ) |
+ </div> |
+ </em> |
+ </dt> |
+ <dd>Matches if the host name of the URL starts with a specified string.</dd> |
+ <!-- OBJECT PROPERTIES --> |
+ <!-- OBJECT METHODS --> |
+ <!-- OBJECT EVENT FIELDS --> |
+ <!-- FUNCTION PARAMETERS --> |
+ </div> |
+ </div><div> |
+ <div> |
+ <dt> |
+ <var>hostSuffix</var> |
+ <em> |
+ <!-- TYPE --> |
+ <div style="display:inline"> |
+ ( |
+ <span class="optional">optional</span> |
+ <span id="typeTemplate"> |
+ <span> |
+ <span>string</span> |
+ </span> |
+ </span> |
+ ) |
+ </div> |
+ </em> |
+ </dt> |
+ <dd>Matches if the host name of the URL ends with a specified string.</dd> |
+ <!-- OBJECT PROPERTIES --> |
+ <!-- OBJECT METHODS --> |
+ <!-- OBJECT EVENT FIELDS --> |
+ <!-- FUNCTION PARAMETERS --> |
+ </div> |
+ </div><div> |
+ <div> |
+ <dt> |
+ <var>pathContains</var> |
+ <em> |
+ <!-- TYPE --> |
+ <div style="display:inline"> |
+ ( |
+ <span class="optional">optional</span> |
+ <span id="typeTemplate"> |
+ <span> |
+ <span>string</span> |
+ </span> |
+ </span> |
+ ) |
+ </div> |
+ </em> |
+ </dt> |
+ <dd>Matches if the path segment of the URL contains a specified string.</dd> |
+ <!-- OBJECT PROPERTIES --> |
+ <!-- OBJECT METHODS --> |
+ <!-- OBJECT EVENT FIELDS --> |
+ <!-- FUNCTION PARAMETERS --> |
+ </div> |
+ </div><div> |
+ <div> |
+ <dt> |
+ <var>pathEquals</var> |
+ <em> |
+ <!-- TYPE --> |
+ <div style="display:inline"> |
+ ( |
+ <span class="optional">optional</span> |
+ <span id="typeTemplate"> |
+ <span> |
+ <span>string</span> |
+ </span> |
+ </span> |
+ ) |
+ </div> |
+ </em> |
+ </dt> |
+ <dd>Matches if the path segment of the URL is equal to a specified string.</dd> |
+ <!-- OBJECT PROPERTIES --> |
+ <!-- OBJECT METHODS --> |
+ <!-- OBJECT EVENT FIELDS --> |
+ <!-- FUNCTION PARAMETERS --> |
+ </div> |
+ </div><div> |
+ <div> |
+ <dt> |
+ <var>pathPrefix</var> |
+ <em> |
+ <!-- TYPE --> |
+ <div style="display:inline"> |
+ ( |
+ <span class="optional">optional</span> |
+ <span id="typeTemplate"> |
+ <span> |
+ <span>string</span> |
+ </span> |
+ </span> |
+ ) |
+ </div> |
+ </em> |
+ </dt> |
+ <dd>Matches if the path segment of the URL starts with a specified string.</dd> |
+ <!-- OBJECT PROPERTIES --> |
+ <!-- OBJECT METHODS --> |
+ <!-- OBJECT EVENT FIELDS --> |
+ <!-- FUNCTION PARAMETERS --> |
+ </div> |
+ </div><div> |
+ <div> |
+ <dt> |
+ <var>pathSuffix</var> |
+ <em> |
+ <!-- TYPE --> |
+ <div style="display:inline"> |
+ ( |
+ <span class="optional">optional</span> |
+ <span id="typeTemplate"> |
+ <span> |
+ <span>string</span> |
+ </span> |
+ </span> |
+ ) |
+ </div> |
+ </em> |
+ </dt> |
+ <dd>Matches if the path segment of the URL ends with a specified string.</dd> |
+ <!-- OBJECT PROPERTIES --> |
+ <!-- OBJECT METHODS --> |
+ <!-- OBJECT EVENT FIELDS --> |
+ <!-- FUNCTION PARAMETERS --> |
+ </div> |
+ </div><div> |
+ <div> |
+ <dt> |
+ <var>queryEquals</var> |
+ <em> |
+ <!-- TYPE --> |
+ <div style="display:inline"> |
+ ( |
+ <span class="optional">optional</span> |
+ <span id="typeTemplate"> |
+ <span> |
+ <span>string</span> |
+ </span> |
+ </span> |
+ ) |
+ </div> |
+ </em> |
+ </dt> |
+ <dd>Matches if the query segment of the URL is equal to a specified string.</dd> |
+ <!-- OBJECT PROPERTIES --> |
+ <!-- OBJECT METHODS --> |
+ <!-- OBJECT EVENT FIELDS --> |
+ <!-- FUNCTION PARAMETERS --> |
+ </div> |
+ </div><div> |
+ <div> |
+ <dt> |
+ <var>queryPrefix</var> |
+ <em> |
+ <!-- TYPE --> |
+ <div style="display:inline"> |
+ ( |
+ <span class="optional">optional</span> |
+ <span id="typeTemplate"> |
+ <span> |
+ <span>string</span> |
+ </span> |
+ </span> |
+ ) |
+ </div> |
+ </em> |
+ </dt> |
+ <dd>Matches if the query segment of the URL starts with a specified string.</dd> |
+ <!-- OBJECT PROPERTIES --> |
+ <!-- OBJECT METHODS --> |
+ <!-- OBJECT EVENT FIELDS --> |
+ <!-- FUNCTION PARAMETERS --> |
+ </div> |
+ </div><div> |
+ <div> |
+ <dt> |
+ <var>querySuffix</var> |
+ <em> |
+ <!-- TYPE --> |
+ <div style="display:inline"> |
+ ( |
+ <span class="optional">optional</span> |
+ <span id="typeTemplate"> |
+ <span> |
+ <span>string</span> |
+ </span> |
+ </span> |
+ ) |
+ </div> |
+ </em> |
+ </dt> |
+ <dd>Matches if the query segment of the URL ends with a specified string.</dd> |
+ <!-- OBJECT PROPERTIES --> |
+ <!-- OBJECT METHODS --> |
+ <!-- OBJECT EVENT FIELDS --> |
+ <!-- FUNCTION PARAMETERS --> |
+ </div> |
+ </div><div> |
+ <div> |
+ <dt> |
+ <var>urlSuffix</var> |
+ <em> |
+ <!-- TYPE --> |
+ <div style="display:inline"> |
+ ( |
+ <span class="optional">optional</span> |
+ <span id="typeTemplate"> |
+ <span> |
+ <span>string</span> |
+ </span> |
+ </span> |
+ ) |
+ </div> |
+ </em> |
+ </dt> |
+ <dd>Matches if the URL ends with a specified string.</dd> |
+ <!-- OBJECT PROPERTIES --> |
+ <!-- OBJECT METHODS --> |
+ <!-- OBJECT EVENT FIELDS --> |
+ <!-- FUNCTION PARAMETERS --> |
+ </div> |
+ </div><div> |
+ <div> |
+ <dt> |
+ <var>urlEquals</var> |
+ <em> |
+ <!-- TYPE --> |
+ <div style="display:inline"> |
+ ( |
+ <span class="optional">optional</span> |
+ <span id="typeTemplate"> |
+ <span> |
+ <span>string</span> |
+ </span> |
+ </span> |
+ ) |
+ </div> |
+ </em> |
+ </dt> |
+ <dd>Matches if the URL is equal to a specified string.</dd> |
+ <!-- OBJECT PROPERTIES --> |
+ <!-- OBJECT METHODS --> |
+ <!-- OBJECT EVENT FIELDS --> |
+ <!-- FUNCTION PARAMETERS --> |
+ </div> |
+ </div><div> |
+ <div> |
+ <dt> |
+ <var>urlPrefix</var> |
+ <em> |
+ <!-- TYPE --> |
+ <div style="display:inline"> |
+ ( |
+ <span class="optional">optional</span> |
+ <span id="typeTemplate"> |
+ <span> |
+ <span>string</span> |
+ </span> |
+ </span> |
+ ) |
+ </div> |
+ </em> |
+ </dt> |
+ <dd>Matches if the URL starts with a specified string.</dd> |
+ <!-- OBJECT PROPERTIES --> |
+ <!-- OBJECT METHODS --> |
+ <!-- OBJECT EVENT FIELDS --> |
+ <!-- FUNCTION PARAMETERS --> |
+ </div> |
+ </div><div> |
+ <div> |
+ <dt> |
+ <var>schemes</var> |
+ <em> |
+ <!-- TYPE --> |
+ <div style="display:inline"> |
+ ( |
+ <span class="optional">optional</span> |
+ <span id="typeTemplate"> |
+ <span> |
+ <span> |
+ array of <span><span> |
+ <span> |
+ <span>string</span> |
+ </span> |
+ </span></span> |
+ </span> |
+ </span> |
+ </span> |
+ ) |
+ </div> |
+ </em> |
+ </dt> |
+ <dd>Matches if the scheme of the URL is equal to any of the schemes specified in the array.</dd> |
+ <!-- OBJECT PROPERTIES --> |
+ <!-- OBJECT METHODS --> |
+ <!-- OBJECT EVENT FIELDS --> |
+ <!-- FUNCTION PARAMETERS --> |
+ </div> |
+ </div><div> |
+ <div> |
+ <dt> |
+ <var>ports</var> |
+ <em> |
+ <!-- TYPE --> |
+ <div style="display:inline"> |
+ ( |
+ <span class="optional">optional</span> |
+ <span id="typeTemplate"> |
+ <span> |
+ <span> |
+ array of <span><span> |
+ <span> |
+ <span>integer or array of integer</span> |
+ </span> |
+ </span></span> |
+ </span> |
+ </span> |
+ </span> |
+ ) |
+ </div> |
+ </em> |
+ </dt> |
+ <dd>Matches if the port of the URL is contained in any of the specified port lists. For example <code>[80, 443, [1000, 1200]]</code> matches all requests on port 80, 443 and in the range 1000-1200.</dd> |
+ <!-- OBJECT PROPERTIES --> |
+ <!-- OBJECT METHODS --> |
+ <!-- OBJECT EVENT FIELDS --> |
+ <!-- FUNCTION PARAMETERS --> |
+ </div> |
+ </div> |
+ </dl> |
+ </dd> |
+ <!-- OBJECT METHODS --> |
+ <!-- OBJECT EVENT FIELDS --> |
+ <!-- FUNCTION PARAMETERS --> |
+ </div> |
+ </div> <!-- /apiItem --> |
+ </div> <!-- /apiGroup --> |
+ </div> <!-- /apiPage --> |
</div> <!-- /gc-pagecontent --> |
</div> <!-- /g-section --> |
</div> <!-- /codesiteContent --> |