I’m getting exactly what I want when I do this console.dir(this) in Chrome.
Is there a way to get that into an array some how?
So I’ve tried to do something like this to get started:
for(var o in console.dir(this)) {
console.log(o);
}
All I get is “undefined” and it prints the list into the console again.
I really just need a name list of all Native Javascript Objects and their respective methods and attributes without the hassle of manually creating and maintaining a monstrous list. Ideally the solution would be a dynamically created array of everything; either flat or multidimensional array so I can iterate through it.
You’re making it too hard: it’s already in a dictionary, because everything in Javascript is already a dictionary.
Just open the javascript console and type
this, and you get an object that expands to(truncated because you can see it yourself.) If you want a particular element of it, just address it: it’s a
DOMWindowobject, it has an elementArray, which has an elementprototype, which contains all the method functions.