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

Unified Diff: chrome/browser/resources/options/browser_options.js

Issue 570503002: Compile chrome://settings, part 6 (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@H_options_errors_4
Patch Set: fix asserts, rebase Created 6 years, 3 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
Index: chrome/browser/resources/options/browser_options.js
diff --git a/chrome/browser/resources/options/browser_options.js b/chrome/browser/resources/options/browser_options.js
index d950e5eeb5ff34c881eac88f235475e6af8ff2fb..e5d18200fa2175abe4b0f6d86d17667ee159215f 100644
--- a/chrome/browser/resources/options/browser_options.js
+++ b/chrome/browser/resources/options/browser_options.js
@@ -662,7 +662,8 @@ cr.define('options', function() {
true);
document.body.addEventListener('click', function(e) {
- var button = findAncestor(e.target, function(el) {
+ var target = assertInstanceof(e.target, Node);
+ var button = findAncestor(target, function(el) {
return el.tagName == 'BUTTON' &&
el.dataset.extensionId !== undefined &&
el.dataset.extensionId.length;
@@ -718,7 +719,7 @@ cr.define('options', function() {
* @private
*/
handleWindowMessage_: function(e) {
- if (e.data.method == 'frameSelected')
+ if ((/** @type {{method: string}} */(e.data)).method == 'frameSelected')
$('search-field').focus();
},
@@ -1252,7 +1253,8 @@ cr.define('options', function() {
/**
* Get the selected profile item from the profile list. This also works
* correctly if the list is not displayed.
- * @return {Object} the profile item object, or null if nothing is selected.
+ * @return {?Object} The profile item object, or null if nothing is
+ * selected.
* @private
*/
getSelectedProfileItem_: function() {

Powered by Google App Engine
This is Rietveld 408576698