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..ebd01a018560eeb05d413c19320559da370ea6e2 100644 |
--- a/ui/webui/resources/js/util.js |
+++ b/ui/webui/resources/js/util.js |
@@ -254,12 +254,13 @@ 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); |
assert(element, 'Missing required element: ' + id); |
Dan Beam
2014/10/01 01:25:57
why does the rest of this method exist now?
Vitaly Pavlenko
2014/10/01 03:07:32
Done.
|
- 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 |