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

Unified Diff: chrome/browser/resources/chromeos/login/bubble.js

Issue 14296002: Use classList#toggle instead of classList[whatever ? 'add' : 'remove']. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: merge Created 7 years, 8 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | chrome/browser/resources/chromeos/login/screen_account_picker.js » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/resources/chromeos/login/bubble.js
diff --git a/chrome/browser/resources/chromeos/login/bubble.js b/chrome/browser/resources/chromeos/login/bubble.js
index 411ad8c406f528867d3b1f7cd42a069cc56b72db..89a20f864aa1ff09bb7b539953ddc1d354f92fbe 100644
--- a/chrome/browser/resources/chromeos/login/bubble.js
+++ b/chrome/browser/resources/chromeos/login/bubble.js
@@ -99,7 +99,7 @@ cr.define('cr.ui', function() {
setAttachment_: function(attachment) {
for (var k in Bubble.Attachment) {
var v = Bubble.Attachment[k];
- this.classList[v == attachment ? 'add' : 'remove'](v);
+ this.classList.toggle(v, v == attachment);
}
},
« no previous file with comments | « no previous file | chrome/browser/resources/chromeos/login/screen_account_picker.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698