Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Show all object methods in a list in Chrome console?

I really love the Chrome console because it autocompletes all the object methods for me.

But it only shows one at a time and I have to press TAB to step to the next one.

Is there a way to show a list of all the autocompletion object methods?

like image 270
never_had_a_name Avatar asked Oct 01 '10 22:10

never_had_a_name


People also ask

How do I show all variables in console?

Open the console and then enter: keys(window) to see variables. dir(window) to see objects.

Which lists all methods defined by an object?

getOwnPropertyNames(obj). filter(item => typeof obj[item] === 'function') This lists only the methods defined on that specific object, not any method defined in its prototype chain. To do that we must take a slightly different route. We must first iterate the prototype chain and we list all the properties in an array.

How do I view items in Chrome console?

Apart from clicking on "More tools-> Developer Tools", we can also open the element box using the following options: Clicking the F12 key. Using keyboard shortcut, "Ctrl + Shift + i" or "Ctrl + Shift + c" on Windows Operating System. The same command works on Chrome OS and Linux.


1 Answers

console.dir( someObject );
like image 52
Šime Vidas Avatar answered Sep 28 '22 02:09

Šime Vidas