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

Unified Diff: ui/webui/resources/js/chromeos/ui_account_tweaks.js

Issue 405743002: Typecheck some of ui/webui/resources/js/ with Closure compiler. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: cr.isMac fix Created 6 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « ui/webui/resources/js/assert.js ('k') | ui/webui/resources/js/cr.js » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ui/webui/resources/js/chromeos/ui_account_tweaks.js
diff --git a/ui/webui/resources/js/chromeos/ui_account_tweaks.js b/ui/webui/resources/js/chromeos/ui_account_tweaks.js
index 9969ec51a388984a39a45d1bc6099c2ac21210a8..76c2d90d1e93a7a158178ea97fc4135dec19351f 100644
--- a/ui/webui/resources/js/chromeos/ui_account_tweaks.js
+++ b/ui/webui/resources/js/chromeos/ui_account_tweaks.js
@@ -109,7 +109,7 @@ cr.define('uiAccountTweaks', function() {
* disables interactive elements (input/select/button), and removes href
* attribute from <a> elements.
*
- * @param {Element} element Root element of DOM subtree that should be
+ * @param {!Element} element Root element of DOM subtree that should be
* disabled.
* @param {string} sessionType session type specificator.
*/
@@ -125,7 +125,8 @@ cr.define('uiAccountTweaks', function() {
var node = walker.nextNode();
while (node) {
- UIAccountTweaks.disableElementForSessionType_(node, sessionType);
+ UIAccountTweaks.disableElementForSessionType_(
+ /** @type {!Element} */(node), sessionType);
node = walker.nextNode();
}
};
@@ -137,7 +138,7 @@ cr.define('uiAccountTweaks', function() {
* <a> element.
*
* @private
- * @param {Element} element Element that should be disabled.
+ * @param {!Element} element Element that should be disabled.
* @param {string} sessionType account session Type specificator.
*/
UIAccountTweaks.disableElementForSessionType_ = function(element,
@@ -145,9 +146,9 @@ cr.define('uiAccountTweaks', function() {
element.classList.add(sessionType + '-disabled');
if (element.nodeName == 'INPUT' ||
element.nodeName == 'SELECT' ||
- element.nodeName == 'BUTTON')
+ element.nodeName == 'BUTTON') {
element.disabled = true;
- if (element.nodeName == 'A') {
+ } else if (element.nodeName == 'A') {
element.onclick = function() {
return false;
};
« no previous file with comments | « ui/webui/resources/js/assert.js ('k') | ui/webui/resources/js/cr.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698