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?
Open the console and then enter: keys(window) to see variables. dir(window) to see objects.
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.
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.
console.dir( someObject );
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With