From 471efd90a4b73646b4a448b13f4caab1a14c7926 Mon Sep 17 00:00:00 2001 From: 43081j <43081j@users.noreply.github.com> Date: Tue, 24 Apr 2018 21:58:21 +0100 Subject: [PATCH] fix jsdoc --- javascript/atoms/dom.js | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/javascript/atoms/dom.js b/javascript/atoms/dom.js index 0c1c8b2020f18..0f1f1fe304308 100644 --- a/javascript/atoms/dom.js +++ b/javascript/atoms/dom.js @@ -567,12 +567,15 @@ bot.dom.isShown_ = function(elem, ignoreOpacity, parentsDisplayedFn) { bot.dom.isShown = function(elem, opt_ignoreOpacity) { /** * Determines whether an element or its parents have `display: none` set - * @param {?Node} + * @param {!Node} e the element * @return {boolean} */ function displayed(e) { - if (bot.dom.isElement(e) && bot.dom.getEffectiveStyle(e, 'display') == 'none') { - return false; + if (bot.dom.isElement(e)) { + var elem = /** @type {!Element} */ (e); + if (bot.dom.getEffectiveStyle(elem, 'display') == 'none') { + return false; + } } var parent = bot.dom.getParentNodeInComposedDom(e);