Open Bug 1270015 Opened 5 years ago Updated 3 years ago

Smarter suggestions for DOM properties


(DevTools :: Console, enhancement, P3)



(Not tracked)


(Reporter: sebo, Unassigned)


(Blocks 2 open bugs)


The auto-completion within the Web console's command line should be smarter with its suggestions.

E.g. when entering a 'd' the probability that the user wants to enter 'document' is much higher than for 'decodeURI', which is the current default suggestion.

It would improve UX a lot if the most common properties, functions, etc. would be selected by default similar to what was done for CSS properties in bug 1168246.

To get 'document.getElementById' you'd then only have to do this:


instead of


Firebug has this already, see


Note that this list, together with surrounding code, represents the tweaks I felt were needed to Firebug's default heuristics to make suggestions subjectively feel good for all of "document.[a-z]", "[a-z]", "console.", "aDomNode.[a-z]", "aFunction.[a-z]". The devtools console uses different heuristics and will need different tweaks. (Firebug hides everything from Object.prototype and generally defaults to the shortest property name rather than the first one lexicographically, which is a bit confusing but also gives reasonably good results in practice.)
Looks like the list of css properties was generated from  I wonder if they have similar data for properties accessed on Document, DOMNode, etc.  This doesn't seem to include that info:
Priority: -- → P3
Product: Firefox → DevTools
You need to log in before you can comment on or make changes to this bug.