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

Side by Side Diff: chrome/browser/resources/sync_internals/about.js

Issue 111833002: Add missing argument to Element.setAttribute() calls (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 7 years 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
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 function highlightIfChanged(node, oldVal, newVal) { 5 function highlightIfChanged(node, oldVal, newVal) {
6 function clearHighlight() { 6 function clearHighlight() {
7 this.removeAttribute('highlighted'); 7 this.removeAttribute('highlighted');
8 } 8 }
9 9
10 var oldStr = oldVal.toString(); 10 var oldStr = oldVal.toString();
11 var newStr = newVal.toString(); 11 var newStr = newVal.toString();
12 if (oldStr != '' && oldStr != newStr) { 12 if (oldStr != '' && oldStr != newStr) {
13 // Note the addListener function does not end up creating duplicate 13 // Note the addListener function does not end up creating duplicate
14 // listeners. There can be only one listener per event at a time. 14 // listeners. There can be only one listener per event at a time.
15 // Reference: https://developer.mozilla.org/en/DOM/element.addEventListener 15 // Reference: https://developer.mozilla.org/en/DOM/element.addEventListener
16 node.addEventListener('webkitAnimationEnd', clearHighlight, false); 16 node.addEventListener('webkitAnimationEnd', clearHighlight, false);
17 node.setAttribute('highlighted'); 17 node.setAttribute('highlighted', '');
18 } 18 }
19 } 19 }
20 20
21 (function() { 21 (function() {
22 // Contains the latest snapshot of sync about info. 22 // Contains the latest snapshot of sync about info.
23 chrome.sync.aboutInfo = {}; 23 chrome.sync.aboutInfo = {};
24 24
25 // TODO(akalin): Make aboutInfo have key names likeThis and not 25 // TODO(akalin): Make aboutInfo have key names likeThis and not
26 // like_this. 26 // like_this.
27 function refreshAboutInfo(aboutInfo) { 27 function refreshAboutInfo(aboutInfo) {
(...skipping 49 matching lines...) Expand 10 before | Expand all | Expand 10 after
77 // Remove listeners to prevent sync events from overwriting imported data. 77 // Remove listeners to prevent sync events from overwriting imported data.
78 chrome.sync.onServiceStateChanged.removeListeners(); 78 chrome.sync.onServiceStateChanged.removeListeners();
79 79
80 var aboutInfo = JSON.parse(data); 80 var aboutInfo = JSON.parse(data);
81 refreshAboutInfo(aboutInfo); 81 refreshAboutInfo(aboutInfo);
82 }); 82 });
83 } 83 }
84 84
85 document.addEventListener('DOMContentLoaded', onLoad, false); 85 document.addEventListener('DOMContentLoaded', onLoad, false);
86 })(); 86 })();
OLDNEW
« no previous file with comments | « chrome/browser/resources/signin_internals/signin_internals.js ('k') | chrome/browser/resources/sync_internals/sync_search.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698