Argument type Element is not assignable to parameter type HTMLxxxElement
Firstly, this is very similar to the following:
Basically, I'm assigning a variable as follows:
var basis_control = document.getElementById('flex-basis-field');
and then passing basis_control to another function whose parameter in JSdoc is declared as {HTMLSelectElement}.
I could go on ignoring statements, but perhaps I'm commenting wrong.
How do I tell the system that document.getElementById is in fact returning a HTMLSelectElement?
Thanks,
Gary
Please sign in to leave a comment.
this is a problem with predefined HTML library - HTMLElement subinterfaces (HTMLSelectElement, HTMLButtonElement, HTMLDivElement, etc.) are not correctly defined in plugins\JavaScriptLanguage\lib\JavaScriptLanguage.jar!\com\intellij\lang\javascript\index\predefined\DHTML.js and thus aren't recognized as Element successors
Please follow https://youtrack.jetbrains.com/issue/WEB-12087 and https://youtrack.jetbrains.com/issue/WEB-12094 for updates
Thanks very much, I missed those in my searching.