As you go deeper into JavaScript, unlike strongly-typed languages, it becomes more difficult to figure out what these values are going to be, unless the JavaScript code is written inside of an HTML page, which the editor can run through in real-time.
var myFunc = function (evt) { console.log(evt); }
window.onclick = myFunc;
myFunc("Bob");
What is an IDE supposed to make of that, and what properties should evt
have?
If JavaScript were strongly-typed, and that function could only accept Event objects, or ClickEvent objects, then the IDE could know exactly what properties to expect.
Just like .getElementById
-- if one page has "myEl" as <a>
and another page has the same ID as <canvas>
then what should the properties be?