Library: page
Overview
The page object is what gets rendered by default at the end
of a request.
source: page.js
Functions
Changes the mode of response output to something other than
HTML. For example, setMode("plain") will not print the default
AppJet HTML document structure (in fact it will not print
anything but your calls to print()).
If you setMode("plain"), you are on your own.
The default output mode is "html", which creates a simple xhtml
document structure.
parameters
| string | newMode | one of ['html', 'plain'] |
Sets whether or not to print the number of milliseconds taken to render
the page in the page's footer. Default is true. Applies only to HTML mode.
parameters
| boolean | show |
Append raw text to the page's HEAD section.
parameters
| string | rawText |
examples
page.head.write("""
<style>
p { font-size: 200%; }
</style>
""");
Gets the page's HEAD section as written so far. Useful especially
for page mode "plain", when a library might write to the HEAD
section.
Renders the entire current page to a string. By default, this is called at the
end of every request and printed to the response buffer, so usually there is
no reason for you to call this.
returns
| string | rendered HTML string of the current page |
Objects