windowjs / windowjs

Window.js is an open-source Javascript runtime for desktop graphics programming.

Home Page:https://windowjs.org

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Improve the console

joaodasilva opened this issue · comments

The console (opens with F1) is just another Window.js program, running in a separate process and communicating with the main window. The source file is src/console.js and can be executed directly for development:

$ out/src/windowjs.exe src/console.js

It's also possible to get a console for the console during development.

It tries to give some common controls like Home key and Delete key support, history, etc. but there's still a lot missing to make it more useful:

  • autocomplete
  • line wrapping of long input lines
  • better colors for output e.g. syntax highlight literals
  • mouse support for text selection
  • better dir() output
  • ideally, dir() would be more like in the Chrome Devtools, supporting expanding objects recursively
  • have a help() function as in the Python interpreter, to explore objects and see their documentation inline. Could be pulled from the online site to avoid growing the binary size.

Some of these can be done now, others (like mouse support) will take more effort.