JSDoc Element parameter type shows as unresolved when using getElementsByClassName()

When I use  @param {Element} or any similar types like HTMLElement in my JsDocs most methods show in autocomplete and don't show up as unresolved in the code inspector. If I use getElementsByClassName, however, it gets flagged as an unresolved method. Similar methods such as getElementsByTagName or getElementById are fine.

Should I be using a different parameter type, or is this a bug?

3 comments
Comment actions Permalink

getElementsByClassName is defined as

HTMLDocument.prototype.getElementsByClassName = function(className) {};

in /plugins/JavaScriptLanguage/lib/JavaScriptLanguage.jar!/com/intellij/lang/javascript/index/predefined/DHTML.js. So you can try using "@param {HTMLDocument}"

0
Comment actions Permalink

Results in exactly the same behaviour - similar methods are fine, getElementsByClassName() shows as unresolved.

0
Comment actions Permalink

works fine for me:

 

what JS libraries do you have enabled? Please try invalidating caches - does the problem persist?

0

Please sign in to leave a comment.