Hi, I have a question about the inspection "Unresolved JavaScript function".
Given the following code:
function MyClass() {}
MyClass.prototype.myFunction = function () {};
var myString = "a string";
myString.myFunction();
I would expect an error highlighted on the last line, but it resolves just fine. myFunction() does not appear on the autocomplete-list, but if I write it out, I don't get any errors (and CMD+mouseclick takes me to the definition above).
Am I missing something fundamentally, or is this the wrong behaviour? Does every function defined (in any namespace or class) resolve for any type of object? Is there a reason that it has to be this way?
Preben
Am I missing something fundamentally, or is this the wrong behaviour? Does every function defined (in any namespace or class) resolve for any type of object? Is there a reason that it has to be this way?
Preben