Above the top level of code that your program can output into ioL, is a special root tag that represents the console itself.
This tag is pre-created with the name console
. At the top level, everything your program outputs affects the default
field of the console tag instance.
While you can't create the root tag yourself, you can use the console
identifier to work with global properties
of the console itself.
<console.clear>
clears the entire program output including all persistent logic and presentation tags, by clearing
the primary field of the root tag of the console. Does not clear secondary fields of the console tag.
<console.title {My Program}>
changes the title of the running program as seen by the user.
<console.backgroundColor {blue}>
sets the background color of the program console to blue.
The primary field of console
contains the entire top-level output of the running program in its current form.
Refers to the pre-existing root tag which is the parent of all other tags in the document tree.
The console tag instance is the parent element of all other elements in the document tree. It is the only object that already exists when a new ioL console is created, and represents the console itself.
All content normally output into the ioL console is pushed into the default field of the console object, which effectively contains the entire document.
Other fields allow you to access or manipulate properties of the console itself, such as the title and app icon, color scheme, etc.