From: Robert Konigsberg Date: Fri, 29 Mar 2013 22:41:43 +0000 (-0400) Subject: Closure fix; force cast from Element to Node. X-Git-Tag: v1.0.0~38^2~8 X-Git-Url: https://adrianiainlam.tk/git/?a=commitdiff_plain;h=db775859ec7ae823b731bfb04cb544ef3ae7ad3a;p=dygraphs.git Closure fix; force cast from Element to Node. --- diff --git a/dygraph-utils.js b/dygraph-utils.js index 11a2fba..f53c81e 100644 --- a/dygraph-utils.js +++ b/dygraph-utils.js @@ -1246,10 +1246,11 @@ Dygraph.isElementContainedBy = function(containee, container) { if (container === null || containee === null) { return false; } - while (containee && containee !== container) { - containee = containee.parentNode; + var containeeNode = /** @type {Node} */ (containee); + while (containeeNode && containeeNode !== container) { + containeeNode = containeeNode.parentNode; } - return (containee === container); + return (containeeNode === container); };