I am building a javascript editor autocomplete, and I would like to list all top-level things that are available. I tried:
Object.keys(window)
and
for (k in window)
but it doesn't look like either is returning things like 'Math' or 'Array'. How can I get everything from window?