OLD | NEW |
1 <!-- BEGIN AUTHORED CONTENT --> | 1 <!-- BEGIN AUTHORED CONTENT --> |
2 | 2 |
3 <h2 id="notes">Notes</h2> | 3 <h2 id="notes">Notes</h2> |
4 | 4 |
5 <p> | 5 <p> |
6 Use the <code>chrome.declarativeWebRequest</code> module to intercept, block, or | 6 Use the <code>chrome.declarativeWebRequest</code> module to intercept, block, or |
7 modify requests in-flight. It is significantly faster than the <a | 7 modify requests in-flight. It is significantly faster than the <a |
8 href="webRequest.html"><code>chrome.webRequest</code> API</a> because you can | 8 href="webRequest.html"><code>chrome.webRequest</code> API</a> because you can |
9 register rules that are evaluated in the browser rather than the | 9 register rules that are evaluated in the browser rather than the |
10 JavaScript engine which reduces roundtrip latencies and allows for very high | 10 JavaScript engine which reduces roundtrip latencies and allows for very high |
(...skipping 17 matching lines...) Expand all Loading... |
28 "declarativeWebRequest", | 28 "declarativeWebRequest", |
29 "*://*.google.com" | 29 "*://*.google.com" |
30 ]</b>, | 30 ]</b>, |
31 ... | 31 ... |
32 }</pre> | 32 }</pre> |
33 | 33 |
34 <h2 id="rules">Rules</h2> | 34 <h2 id="rules">Rules</h2> |
35 | 35 |
36 <p> | 36 <p> |
37 The Declarative Web Request API follows the concepts of the <a | 37 The Declarative Web Request API follows the concepts of the <a |
38 href="declarative.html">Declarative API</a>. You can register rules to the | 38 href="events.html#declarative">Declarative API</a>. You can register rules to |
39 <code>chrome.declarativeWebRequest.onRequest</code> event object. | 39 the <code>chrome.declarativeWebRequest.onRequest</code> event object. |
40 </p> | 40 </p> |
41 | 41 |
42 <p> | 42 <p> |
43 The Declarative Web Request API supports a single type of match criteria, the | 43 The Declarative Web Request API supports a single type of match criteria, the |
44 <code>RequestMatcher</code>. The <code>RequestMatcher</code> matches network | 44 <code>RequestMatcher</code>. The <code>RequestMatcher</code> matches network |
45 requests if and only if all listed criteria are met. The following | 45 requests if and only if all listed criteria are met. The following |
46 <code>RequestMatcher</code> would match a network request when the user enters | 46 <code>RequestMatcher</code> would match a network request when the user enters |
47 "http://www.example.com" in the URL bar: | 47 "http://www.example.com" in the URL bar: |
48 </p> | 48 </p> |
49 | 49 |
(...skipping 65 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
115 <h2 id="TODO">Todo</h2> | 115 <h2 id="TODO">Todo</h2> |
116 <ul> | 116 <ul> |
117 <li>Explain precedences, once we can ignore rules based on their priority | 117 <li>Explain precedences, once we can ignore rules based on their priority |
118 (e.g. how can I cancel all requests except for a specific whitelist?) | 118 (e.g. how can I cancel all requests except for a specific whitelist?) |
119 <li>Explain when conditions can be evaluated, when actions can be executed, | 119 <li>Explain when conditions can be evaluated, when actions can be executed, |
120 and when rules can be executed (e.g. you cannot cancel a request when you | 120 and when rules can be executed (e.g. you cannot cancel a request when you |
121 have received the response already) | 121 have received the response already) |
122 </ul> | 122 </ul> |
123 | 123 |
124 <!-- END AUTHORED CONTENT --> | 124 <!-- END AUTHORED CONTENT --> |
OLD | NEW |