OLD | NEW |
1 <p> | 1 <p> |
2 An <code>Event</code> is an object | 2 An <code>Event</code> is an object |
3 that allows you to be notified | 3 that allows you to be notified |
4 when something interesting happens. | 4 when something interesting happens. |
5 Here's an example of using the | 5 Here's an example of using the |
6 <code>chrome.tabs.onCreated</code> event | 6 <code>chrome.tabs.onCreated</code> event |
7 to be notified whenever there's a new tab: | 7 to be notified whenever there's a new tab: |
8 </p> | 8 </p> |
9 | 9 |
10 <pre> | 10 <pre> |
(...skipping 125 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
136 rules were removed. | 136 rules were removed. |
137 </p> | 137 </p> |
138 | 138 |
139 <h3 id="retrievingrules">Retrieving rules</h3> | 139 <h3 id="retrievingrules">Retrieving rules</h3> |
140 | 140 |
141 <p> | 141 <p> |
142 To retrieve a list of currently registered rules, call the | 142 To retrieve a list of currently registered rules, call the |
143 <code>getRules()</code> function. It accepts an optional array of rule | 143 <code>getRules()</code> function. It accepts an optional array of rule |
144 identifiers with the same semantics as <code>removeRules</code> and a callback | 144 identifiers with the same semantics as <code>removeRules</code> and a callback |
145 function. | 145 function. |
146 <p> | 146 </p> |
147 | 147 |
148 <pre> | 148 <pre> |
149 var rule_ids = ["id1", "id2", ...]; | 149 var rule_ids = ["id1", "id2", ...]; |
150 function getRules(rule_ids, function callback(details) {...}); | 150 function getRules(rule_ids, function callback(details) {...}); |
151 </pre> | 151 </pre> |
152 | 152 |
153 <p> | 153 <p> |
154 The <code>details</code> parameter passed to the <code>calback()</code> function | 154 The <code>details</code> parameter passed to the <code>calback()</code> function |
155 refers to an array of rules including filled optional parameters. | 155 refers to an array of rules including filled optional parameters. |
156 </p> | 156 </p> |
157 </div> | 157 </div> |
| 158 {{/is_apps}} |
OLD | NEW |