Outputting data
Your run can output data in various places.
The "run header" is a normal HTML div, that floats on top of the graphics area.
We can output to the run header using AB.msg:
AB.msg ( html, n ); // Write a message (html) to a numbered location in the run header
AB.msg ( html ); // Write message to location 1
AB.escapeHTML ( string ); // return string with all HTML chars escaped
AB.escapeHTMLshort ( string ); // just escape < and >
AB.newDiv ( id ); // Create new div on page with this id (can then set style, content)
- The locations that AB.msg can write to in the run header are numbered:
- See JS code search of all Worlds for use of AB.msg.
Writing instructions for the user
You can write instructions for the user:
- On a splash screen.
Though these instructions will vanish.
- In the run header, using AB.msg.
This does not vanish.
- In code.
You can write instructions for coders at the top of the JS code.
Output to disk or console
You can also output to disk or to console: