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

Unified Diff: ui/webui/resources/js/util.js

Issue 454223004: Typecheck JS files for chrome://history (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@B_download
Patch Set: rebase once again 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/event_tracker.js ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ui/webui/resources/js/util.js
diff --git a/ui/webui/resources/js/util.js b/ui/webui/resources/js/util.js
index 0c92e473dfa12d8842a47d93ad45e9af2ef70122..7c0be72ad5438f1ee893cfe4af54098233010088 100644
--- a/ui/webui/resources/js/util.js
+++ b/ui/webui/resources/js/util.js
@@ -168,14 +168,14 @@ function setQueryParam(location, key, value) {
}
/**
- * @param {Node} el An element to search for ancestors with |className|.
+ * @param {Element} el An element to search for ancestors with |className|.
* @param {string} className A class to search for.
- * @return {Node} A node with class of |className| or null if none is found.
+ * @return {Element} A node with class of |className| or null if none is found.
*/
function findAncestorByClass(el, className) {
- return findAncestor(el, function(el) {
+ return /** @type {Element} */(findAncestor(el, function(el) {
return el.classList && el.classList.contains(className);
- });
+ }));
}
/**
« no previous file with comments | « ui/webui/resources/js/event_tracker.js ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698