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

Side by Side Diff: chrome/test/data/extensions/samples/set_icon_path/background.html

Issue 269103: Implement chrome.browserAction.setIcon({path:...}); (Closed)
Patch Set: Created 11 years, 2 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
OLDNEW
(Empty)
1 <html>
2 <head>
3 <script>
4 var min = 1;
5 var max = 5;
6 var current = min;
7
8 function updateIcon() {
9 chrome.browserAction.setIcon({path:"icon" + current + ".png"});
10 current++;
11
12 if (current > max)
13 current = min;
14 }
15
16 chrome.browserAction.onClicked.addListener(updateIcon);
17 updateIcon();
18 </script>
19 </head>
20 </html>
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698