| OLD | NEW |
| 1 <h1 id="url_handlers">url_handlers</h1> | 1 <h1 id="url_handlers">url_handlers</h1> |
| 2 | 2 |
| 3 <p> | 3 <p> |
| 4 Used by <a href="../app_lifecycle.html#eventpage">packaged apps</a> | 4 Used by <a href="../app_lifecycle#eventpage">packaged apps</a> |
| 5 to specify URL patterns the app wants to intercept and handle. An app can | 5 to specify URL patterns the app wants to intercept and handle. An app can |
| 6 define multiple URL handlers under this manifest entry, each having an identifie
r, | 6 define multiple URL handlers under this manifest entry, each having an identifie
r, |
| 7 a URL pattern, and a title. | 7 a URL pattern, and a title. |
| 8 Here's an example of how to specify <code>url_handlers</code>: | 8 Here's an example of how to specify <code>url_handlers</code>: |
| 9 </p> | 9 </p> |
| 10 | 10 |
| 11 <pre data-filename="manifest.json"> | 11 <pre data-filename="manifest.json"> |
| 12 "url_handlers": { | 12 "url_handlers": { |
| 13 "view_foo_presentation": { | 13 "view_foo_presentation": { |
| 14 "matches": [ | 14 "matches": [ |
| (...skipping 25 matching lines...) Expand all Loading... |
| 40 </p> | 40 </p> |
| 41 <p> | 41 <p> |
| 42 This automatically means that at least a complete domain should always be | 42 This automatically means that at least a complete domain should always be |
| 43 specified for all the patterns under <code>matches</code> (otherwise ownership | 43 specified for all the patterns under <code>matches</code> (otherwise ownership |
| 44 cannot be verified). | 44 cannot be verified). |
| 45 </p> | 45 </p> |
| 46 <p> | 46 <p> |
| 47 Upon successful registration and installation, an app will be launched for all | 47 Upon successful registration and installation, an app will be launched for all |
| 48 matching navigations inside browser tabs as well as other apps. The app will | 48 matching navigations inside browser tabs as well as other apps. The app will |
| 49 receive a new kind of the | 49 receive a new kind of the |
| 50 <a href="../app_runtime.html#event-onLaunched">app.runtime.onLaunched</a> | 50 <a href="../app_runtime#event-onLaunched">app.runtime.onLaunched</a> |
| 51 event, with the launchData | 51 event, with the launchData |
| 52 object containing the matched handler's identifier (such as "view_foo_presentati
on" | 52 object containing the matched handler's identifier (such as "view_foo_presentati
on" |
| 53 above), the URL being navigated to, and the referrer's URL. | 53 above), the URL being navigated to, and the referrer's URL. |
| 54 </p> | 54 </p> |
| 55 <p> | 55 <p> |
| 56 The <code>title</code> field is reserved for future use in all relevant UI eleme
nts. | 56 The <code>title</code> field is reserved for future use in all relevant UI eleme
nts. |
| 57 It should describe the action that the app performs when launched with this type | 57 It should describe the action that the app performs when launched with this type |
| 58 of URL handler. | 58 of URL handler. |
| 59 </p> | 59 </p> |
| OLD | NEW |