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

Unified Diff: chrome/browser/resources/print_preview/component.js

Issue 2857983007: Print Preview: Make getChildElement return required HTMLElement (Closed)
Patch Set: Created 3 years, 7 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/print_preview/component.js
diff --git a/chrome/browser/resources/print_preview/component.js b/chrome/browser/resources/print_preview/component.js
index 3c18829a22e2e16a445447b69bc77a467f05dc62..0b53d1e875ad412ef6c040c9b86d4b40fc6e72e2 100644
--- a/chrome/browser/resources/print_preview/component.js
+++ b/chrome/browser/resources/print_preview/component.js
@@ -162,12 +162,10 @@ cr.define('print_preview', function() {
* @param {string} query Selector query to select an element starting from
* the component's root element using a depth first search for the first
* element that matches the query.
- * @return {HTMLElement} Element selected by the given query.
- * TODO(alekseys): Check all call sites and rename this function to
- * something like getRequiredChildElement.
+ * @return {!HTMLElement} Element selected by the given query.
*/
getChildElement: function(query) {
- return this.element_.querySelector(query);
+ return assert(this.element_.querySelector(query));
},
/**

Powered by Google App Engine
This is Rietveld 408576698