class

WebOutStream

@Js
class WebOutStream : OutStream

WebOutStream provides methods for generating XML and XHTML content.

constructors make

Construct a WebOutStream that wraps the given OutStream

methods select

Start a <select> tag

hr

Write out a complete <hr/> tag

textField

Convenience for input("type='text'" + attrs)

password

Convenience for input("type='password'" + attrs)

initJs

Customize how the JavaScript runtime environment is initialized

asideEnd

End a <aside> tag

h5End

End a <h5> tag

nav

Start a <nav> tag

spanEnd

End a <span> tag

divEnd

End a <div> tag

includeCss

Write a complete <link> tag for an external CSS stylesheet

script

Start a <script> tag

footerEnd

End a <footer> tag

input

Write a complete <input> tag

bEnd

End a <b> tag

style

Start a <style> tag

liEnd

End a <li> tag

headerEnd

End a <header> tag

br

Write out a complete <br/> tag

textAreaEnd

End a <textarea> tag

rss

Write a complete <link> tag for a RSS feed resource

thEnd

End a <th> tag

sectionEnd

End a <section> tag

checkbox

Convenience for input("type='checkbox'" + attrs)

table

Start a <table> tag

h2End

End a <h2> tag

a

Start a <a> tag

b

Start a <b> tag

docType

Write the XHTML Strict DOCTYPE

ulEnd

End a <ul> tag

i

Start a <i> tag

labelEnd

End a <label> tag

p

Start a <p> tag

td

Start a <td> tag

tfoot

Start a <tfoot> tag

docType5

Write the HTML5 DOCTYPE

esc

Write obj.toStr to the stream as valid XML text

th

Start a <th> tag

w

Convenience for writeChars(obj.toStr)

pEnd

End a <p> tag

atom

Write a complete <link> tag for an Atom feed resource

li

Start a <li> tag

tr

Start a <tr> tag

span

Start a <span> tag

styleEnd

End a <style> tag

textArea

Start a <textarea> tag

dd

Start a <dd> tag

dlEnd

End a <dl> tag

h1End

End a <h1> tag

iEnd

End a <i> tag

tbody

Start a <tbody> tag

dl

Start a <dl> tag

selectEnd

End a <select> tag

theadEnd

End a <thead> tag

main

Start a <main> tag

section

Start a <section> tag

body

Start a <body> tag

codeEnd

End a <code> tag

tableEnd

End a <table> tag

radio

Convenience for input("type='radio'" + attrs)

div

Start a <div> tag

dt

Start a <dt> tag

ddEnd

End a <dd> tag

tab

Convenience for writeChars(Str.spaces(numSpaces))

aEnd

End a <a> tag

ul

Start a <ul> tag

tagEnd

Write an end tag

html

Start a <html> tag

tag

Write a start tag

bodyEnd

End a <body> tag

htmlEnd

End a <html> tag

dtEnd

End a <dt> tag

pre

Start a <pre> tag

em

Start a <em> tag

tbodyEnd

End a <tbody> tag

preEnd

End a <pre> tag

article

Start a <article> tag

aside

Start a <aside> tag

header

Start a <header> tag

h4End

End a <h4> tag

headEnd

End a <head> tag

nl

Convenience for writeChar(\n)

option

Start a <option> tag

h3End

End a <h3> tag

img

Write a complete <img> tag

code

Start a <code> tag

hidden

Convenience for input("type='hidden'" + attrs)

submit

Convenience for input("type='submit'" + attrs)

footer

Start a <footer> tag

thead

Start a <thead> tag

h1

Start a <h1> tag

h2

Start a <h2> tag

h3

Start a <h3> tag

h4

Start a <h4> tag

title

Write a complete <title> tag

h5

Start a <h5> tag

h6

Start a <h6> tag

button

Convenience for input("type='button'" + attrs)

head

Start a <head> tag

articleEnd

End a <article> tag

emEnd

End a <em> tag

favIcon

Write a complete <link> tag for a favicon

includeJs

Write a complete <script> tag for an external JavaScript file

optionEnd

End a <option> tag

tdEnd

End a <td> tag

ol

Start a <ol> tag

tfootEnd

End a <tfoot> tag

formEnd

End a <form> tag

mainEnd

End a <main> tag

titleEnd

End a <title> tag

trEnd

End a <tr> tag

label

Start a <label> tag

prolog

Write out a prolog statement using the streams current charset encoding

olEnd

End a <ol> tag

form

Start a <form> tag

scriptEnd

End a <script> tag

navEnd

End a <nav> tag

h6End

End a <h6> tag

a This a(Uri href, Str? attrs)

Start a <a> tag.

aEnd This aEnd()

End a <a> tag.

article This article(Str? attrs)

Start a <article> tag.

articleEnd This articleEnd()

End a <article> tag.

aside This aside(Str? attrs)

Start a <aside> tag.

asideEnd This asideEnd()

End a <aside> tag.

atom This atom(Uri href, Str? attrs)

Write a complete <link> tag for an Atom feed resource.

b This b(Str? attrs)

Start a <b> tag.

bEnd This bEnd()

End a <b> tag.

body This body(Str? attrs)

Start a <body> tag.

bodyEnd This bodyEnd()

End a <body> tag.

br This br()

Write out a complete <br/> tag.

button This button(Str? attrs)

Convenience for input("type='button'" + attrs).

checkbox This checkbox(Str? attrs)

Convenience for input("type='checkbox'" + attrs)

code This code(Str? attrs)

Start a <code> tag.

codeEnd This codeEnd()

End a <code> tag.

dd This dd(Str? attrs)

Start a <dd> tag.

ddEnd This ddEnd()

End a <dd> tag.

div This div(Str? attrs)

Start a <div> tag.

divEnd This divEnd()

End a <div> tag.

dl This dl(Str? attrs)

Start a <dl> tag.

dlEnd This dlEnd()

End a <dl> tag.

docType This docType()

Write the XHTML Strict DOCTYPE.

docType5 This docType5()

Write the HTML5 DOCTYPE.

dt This dt(Str? attrs)

Start a <dt> tag.

dtEnd This dtEnd()

End a <dt> tag.

em This em(Str? attrs)

Start a <em> tag.

emEnd This emEnd()

End a <em> tag.

esc This esc(Obj? obj)

Write obj.toStr to the stream as valid XML text. The special control characters amp, lt, apos and quot are always escaped. The gt char is escaped only if it is the first char or if preceeded by the ] char. Also see Str.toXml. If obj is null, then "null" is written.

favIcon This favIcon(Uri href, Str? attrs)

Write a complete <link> tag for a favicon. You must specifiy the MIME type for your icon in the attrs argument:

out.favIcon(`/fav.png`, "type='image/png'")

footer This footer(Str? attrs)

Start a <footer> tag.

footerEnd This footerEnd()

End a <footer> tag.

form This form(Str? attrs)

Start a <form> tag.

formEnd This formEnd()

End a <form> tag.

h1 This h1(Str? attrs)

Start a <h1> tag.

h1End This h1End()

End a <h1> tag.

h2 This h2(Str? attrs)

Start a <h2> tag.

h2End This h2End()

End a <h2> tag.

h3 This h3(Str? attrs)

Start a <h3> tag.

h3End This h3End()

End a <h3> tag.

h4 This h4(Str? attrs)

Start a <h4> tag.

h4End This h4End()

End a <h4> tag.

h5 This h5(Str? attrs)

Start a <h5> tag.

h5End This h5End()

End a <h5> tag.

h6 This h6(Str? attrs)

Start a <h6> tag.

h6End This h6End()

End a <h6> tag.

head This head()

Start a <head> tag.

headEnd This headEnd()

End a <head> tag.

header This header(Str? attrs)

Start a <header> tag.

headerEnd This headerEnd()

End a <header> tag.

hidden This hidden(Str? attrs)

Convenience for input("type='hidden'" + attrs).

hr This hr(Str? attrs)

Write out a complete <hr/> tag.

html This html()

Start a <html> tag.

htmlEnd This htmlEnd()

End a <html> tag.

i This i(Str? attrs)

Start a <i> tag.

iEnd This iEnd()

End a <i> tag.

img This img(Uri src, Str? attrs)

Write a complete <img> tag.

includeCss This includeCss(Uri href)

Write a complete <link> tag for an external CSS stylesheet. If this URI has already been included in this WebOutStream instance, then this method does nothing.

includeJs This includeJs(Uri? href)

Write a complete <script> tag for an external JavaScript file. If this URI has already been included in this WebOutStream instance, then this method does nothing.

initJs This initJs(Str:Str env)

Customize how the JavaScript runtime environment is initialized. This method must be called inside the <head> tag, and also before sys.js is loaded in order to take effect.

Note this method is not necessary if no customization is needed. The JS runtime will automatically initialize using default values.

The following variables are supported:

  • timezone: set the default TimeZone for JsVM
  • locale: set the default Locale for the JsVM. Note you must manually provide the locale config.props files. See FilePack.toLocaleJsFile.
  • main: an optional method to invoke after the page has been loaded. The main argument can be either a type or method. If no method is specified, main is used. If the method is not static, a new instance of type is created:
    "foo::Instance"     =>  Instance().main()
    "foo::Instance.bar" =>  Instance().bar()
    "foo::Static"       =>  Static.main()
    "foo::Static.bar"   =>  Static.bar()

input This input(Str? attrs)

Write a complete <input> tag.

label This label(Str? attrs)

Start a <label> tag.

labelEnd This labelEnd()

End a <label> tag.

li This li(Str? attrs)

Start a <li> tag.

liEnd This liEnd()

End a <li> tag.

main This main(Str? attrs)

Start a <main> tag.

mainEnd This mainEnd()

End a <main> tag.

make new make(OutStream out)

Construct a WebOutStream that wraps the given OutStream.

nav This nav(Str? attrs)

Start a <nav> tag.

navEnd This navEnd()

End a <nav> tag.

nl This nl()

Convenience for writeChar(\n).

ol This ol(Str? attrs)

Start a <ol> tag.

olEnd This olEnd()

End a <ol> tag.

option This option(Str? attrs)

Start a <option> tag.

optionEnd This optionEnd()

End a <option> tag.

p This p(Str? attrs)

Start a <p> tag.

pEnd This pEnd()

End a <p> tag.

password This password(Str? attrs)

Convenience for input("type='password'" + attrs).

pre This pre(Str? attrs)

Start a <pre> tag.

preEnd This preEnd()

End a <pre> tag.

prolog This prolog()

Write out a prolog statement using the streams current charset encoding.

radio This radio(Str? attrs)

Convenience for input("type='radio'" + attrs)

rss This rss(Uri href, Str? attrs)

Write a complete <link> tag for a RSS feed resource.

script This script(Str? attrs)

Start a <script> tag.

scriptEnd This scriptEnd()

End a <script> tag.

section This section(Str? attrs)

Start a <section> tag.

sectionEnd This sectionEnd()

End a <section> tag.

select This select(Str? attrs)

Start a <select> tag.

selectEnd This selectEnd()

End a <select> tag.

span This span(Str? attrs)

Start a <span> tag.

spanEnd This spanEnd()

End a <span> tag.

style This style(Str? attrs)

Start a <style> tag.

styleEnd This styleEnd()

End a <style> tag.

submit This submit(Str? attrs)

Convenience for input("type='submit'" + attrs).

tab This tab(Int numSpaces)

Convenience for writeChars(Str.spaces(numSpaces)).

table This table(Str? attrs)

Start a <table> tag.

tableEnd This tableEnd()

End a <table> tag.

tag This tag(Str elemName, Str? attrs, Bool empty)

Write a start tag. Use attrs to fully specify the attributes manually. Use empty to optionally close this element without using an end tag.

tagEnd This tagEnd(Str elemName)

Write an end tag.

tbody This tbody(Str? attrs)

Start a <tbody> tag.

tbodyEnd This tbodyEnd()

End a <tbody> tag.

td This td(Str? attrs)

Start a <td> tag.

tdEnd This tdEnd()

End a <td> tag.

textArea This textArea(Str? attrs)

Start a <textarea> tag.

textAreaEnd This textAreaEnd()

End a <textarea> tag.

textField This textField(Str? attrs)

Convenience for input("type='text'" + attrs).

tfoot This tfoot(Str? attrs)

Start a <tfoot> tag.

tfootEnd This tfootEnd()

End a <tfoot> tag.

th This th(Str? attrs)

Start a <th> tag.

thEnd This thEnd()

End a <th> tag.

thead This thead(Str? attrs)

Start a <thead> tag.

theadEnd This theadEnd()

End a <thead> tag.

title This title(Str? attrs)

Write a complete <title> tag.

titleEnd This titleEnd()

End a <title> tag.

tr This tr(Str? attrs)

Start a <tr> tag.

trEnd This trEnd()

End a <tr> tag.

ul This ul(Str? attrs)

Start a <ul> tag.

ulEnd This ulEnd()

End a <ul> tag.

w This w(Obj? obj)

Convenience for writeChars(obj.toStr).

Haxall 4.0.5 ∙ 24-Feb-2026 14:33 EST