Index: ui/webui/resources/js/util.js |
diff --git a/ui/webui/resources/js/util.js b/ui/webui/resources/js/util.js |
index 7c0be72ad5438f1ee893cfe4af54098233010088..dce38b499dff2b60ec7ff2319b8c10f11c9ffb76 100644 |
--- a/ui/webui/resources/js/util.js |
+++ b/ui/webui/resources/js/util.js |
@@ -254,12 +254,12 @@ function isRTL() { |
* calling getElementById and not checking the result because this lets us |
* satisfy the JSCompiler type system. |
* @param {string} id The identifier name. |
- * @return {!Element} the Element. |
+ * @return {!HTMLElement} the Element. |
*/ |
function getRequiredElement(id) { |
var element = $(id); |
Dan Beam
2014/10/02 02:56:35
^ remove
Vitaly Pavlenko
2014/10/02 18:18:22
Done.
|
- assert(element, 'Missing required element: ' + id); |
- return /** @type {!Element} */(element); |
+ return assertInstanceof($(id), HTMLElement, |
+ 'Missing required element: ' + id); |
} |
// Handle click on a link. If the link points to a chrome: or file: url, then |