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

Side by Side Diff: chrome/common/extensions/docs/examples/tutorials/getstarted/popup.js

Issue 12207102: Fixed misnamed function call in popup.js in Chrome Extension tutorial (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 7 years, 10 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
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 /** 5 /**
6 * Global variable containing the query we'd like to pass to Flickr. In this 6 * Global variable containing the query we'd like to pass to Flickr. In this
7 * case, kittens! 7 * case, kittens!
8 * 8 *
9 * @type {string} 9 * @type {string}
10 */ 10 */
(...skipping 19 matching lines...) Expand all
30 'per_page=20', 30 'per_page=20',
31 31
32 /** 32 /**
33 * Sends an XHR GET request to grab photos of lots and lots of kittens. The 33 * Sends an XHR GET request to grab photos of lots and lots of kittens. The
34 * XHR's 'onload' event is hooks up to the 'showPhotos_' method. 34 * XHR's 'onload' event is hooks up to the 'showPhotos_' method.
35 * 35 *
36 * @public 36 * @public
37 */ 37 */
38 requestKittens: function() { 38 requestKittens: function() {
39 var req = new XMLHttpRequest(); 39 var req = new XMLHttpRequest();
40 req.open("GET", this.kittensOnFlickr_, true); 40 req.open("GET", this.searchOnFlickr_, true);
41 req.onload = this.showPhotos_.bind(this); 41 req.onload = this.showPhotos_.bind(this);
42 req.send(null); 42 req.send(null);
43 }, 43 },
44 44
45 /** 45 /**
46 * Handle the 'onload' event of our kitten XHR request, generated in 46 * Handle the 'onload' event of our kitten XHR request, generated in
47 * 'requestKittens', by generating 'img' elements, and stuffing them into 47 * 'requestKittens', by generating 'img' elements, and stuffing them into
48 * the document for display. 48 * the document for display.
49 * 49 *
50 * @param {ProgressEvent} e The XHR ProgressEvent. 50 * @param {ProgressEvent} e The XHR ProgressEvent.
(...skipping 23 matching lines...) Expand all
74 "/" + photo.getAttribute("id") + 74 "/" + photo.getAttribute("id") +
75 "_" + photo.getAttribute("secret") + 75 "_" + photo.getAttribute("secret") +
76 "_s.jpg"; 76 "_s.jpg";
77 } 77 }
78 }; 78 };
79 79
80 // Run our kitten generation script as soon as the document's DOM is ready. 80 // Run our kitten generation script as soon as the document's DOM is ready.
81 document.addEventListener('DOMContentLoaded', function () { 81 document.addEventListener('DOMContentLoaded', function () {
82 kittenGenerator.requestKittens(); 82 kittenGenerator.requestKittens();
83 }); 83 });
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698