Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(366)

Side by Side Diff: chrome/common/extensions/docs/templates/intros/location.html

Issue 19763008: Adding dev documentation for chrome.location (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 7 years, 4 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
OLDNEW
(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>
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698