Chromium Code Reviews| OLD | NEW |
|---|---|
| (Empty) | |
| 1 <p id="classSummary"> | |
|
Jeffrey Yasskin
2013/07/27 03:00:29
Does this id do anything visible in the UI? Would
vadimt
2013/07/30 01:58:41
Done.
| |
| 2 To create a location watch, call $ref:location.watchLocation passing in | |
|
Andy
2013/07/30 00:56:06
Before you explain how to create a location watch,
vadimt
2013/07/30 01:58:41
Done.
| |
| 3 the location watch details via the <code>requestInfo</code> parameter: | |
| 4 </p> | |
| 5 | |
| 6 <pre>chrome.location.watchLocation(name, requestInfo);</pre> | |
| 7 <p> | |
| 8 You'll also need to add a listener | |
|
Andy
2013/07/30 00:56:06
Suggestion: "You'll also" --> "You also"
vadimt
2013/07/30 01:58:41
Done.
| |
| 9 to its <code>onChanged</code> event. | |
|
Andy
2013/07/30 00:56:06
What does "its" refer to here?
vadimt
2013/07/30 01:58:41
Done.
| |
| 10 Chrome will fire this event after you create your location watch. After this, | |
| 11 it will keep firing the event every time the geographical location of your | |
| 12 computer changes until you call $ref:location.clearWatch. | |
|
Andy
2013/07/30 00:56:06
Suggestion: "the geographical location of your com
vadimt
2013/07/30 01:58:41
Done.
| |
| 13 </p> | |
| 14 <p> | |
| 15 Here's sample code | |
| 16 to listen for location updates: | |
| 17 </p> | |
| 18 <pre> | |
| 19 chrome.location.onLocationUpdate.addListener(function(position) { | |
| 20 console.log(JSON.stringify(position)); | |
| 21 }); | |
| 22 </pre> | |
| OLD | NEW |