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 a

Start a tag

aEnd

End a tag

article

Start a tag

articleEnd

End a tag

aside

Start a tag

asideEnd

End a tag

atom

Write a complete tag for an Atom feed resource

b

Start a tag

bEnd

End a tag

body

Start a tag

bodyEnd

End a tag

br

Write out a complete tag

button

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

checkbox

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

code

Start a tag

codeEnd

End a tag

dd

Start a tag

ddEnd

End a tag

div

Start a tag

divEnd

End a tag

dl

Start a tag

dlEnd

End a tag

docType

Write the XHTML Strict DOCTYPE

docType5

Write the HTML5 DOCTYPE

dt

Start a tag

dtEnd

End a tag

em

Start a tag

emEnd

End a tag

esc

Write obj.toStr to the stream as valid XML text

favIcon

Write a complete tag for a favicon

footer

Start a tag

footerEnd

End a tag

form

Start a tag

formEnd

End a tag

h1

Start a tag

h1End

End a tag

h2

Start a tag

h2End

End a tag

h3

Start a tag

h3End

End a tag

h4

Start a tag

h4End

End a tag

h5

Start a tag

h5End

End a tag

h6

Start a tag

h6End

End a tag

head

Start a tag

headEnd

End a tag

header

Start a tag

headerEnd

End a tag

hidden

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

hr

Write out a complete tag

html

Start a tag

htmlEnd

End a tag

i

Start a tag

iEnd

End a tag

img

Write a complete tag

includeCss

Write a complete tag for an external CSS stylesheet

includeJs

Write a complete tag for an external JavaScript file

initJs

Customize how the JavaScript runtime environment is initialized

input

Write a complete tag

label

Start a tag

labelEnd

End a tag

li

Start a tag

liEnd

End a tag

main

Start a tag

mainEnd

End a tag

nav

Start a tag

navEnd

End a tag

nl

Convenience for writeChar(\n)

ol

Start a tag

olEnd

End a tag

option

Start a tag

optionEnd

End a tag

p

Start a tag

pEnd

End a tag

password

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

pre

Start a tag

preEnd

End a tag

prolog

Write out a prolog statement using the streams current charset encoding

radio

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

rss

Write a complete tag for a RSS feed resource

script

Start a tag

scriptEnd

End a tag

section

Start a tag

sectionEnd

End a tag

select

Start a tag

selectEnd

End a tag

span

Start a tag

spanEnd

End a tag

style

Start a tag

styleEnd

End a tag

submit

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

tab

Convenience for writeChars(Str.spaces(numSpaces))

table

Start a tag

tableEnd

End a tag

tag

Write a start tag

tagEnd

Write an end tag

tbody

Start a tag

tbodyEnd

End a tag

td

Start a tag

tdEnd

End a tag

textArea

Start a tag

textAreaEnd

End a tag

textField

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

tfoot

Start a tag

tfootEnd

End a tag

th

Start a tag

thEnd

End a tag

thead

Start a tag

theadEnd

End a tag

title

Write a complete tag

titleEnd

End a tag

tr

Start a tag

trEnd

End a tag

ul

Start a tag

ulEnd

End a tag

w

Convenience for writeChars(obj.toStr)

a This a(Uri href, Str? attrs := null)

Start a tag.

aEnd This aEnd()

End a tag.

article This article(Str? attrs := null)

Start a tag.

articleEnd This articleEnd()

End a tag.

aside This aside(Str? attrs := null)

Start a tag.

asideEnd This asideEnd()

End a tag.

atom This atom(Uri href, Str? attrs := null)

Write a complete tag for an Atom feed resource.

b This b(Str? attrs := null)

Start a tag.

bEnd This bEnd()

End a tag.

body This body(Str? attrs := null)

Start a tag.

bodyEnd This bodyEnd()

End a tag.

br This br()

Write out a complete tag.

button This button(Str? attrs := null)

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

checkbox This checkbox(Str? attrs := null)

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

code This code(Str? attrs := null)

Start a tag.

codeEnd This codeEnd()

End a tag.

dd This dd(Str? attrs := null)

Start a tag.

ddEnd This ddEnd()

End a tag.

div This div(Str? attrs := null)

Start a tag.

divEnd This divEnd()

End a tag.

dl This dl(Str? attrs := null)

Start a tag.

dlEnd This dlEnd()

End a tag.

docType This docType()

Write the XHTML Strict DOCTYPE.

docType5 This docType5()

Write the HTML5 DOCTYPE.

dt This dt(Str? attrs := null)

Start a tag.

dtEnd This dtEnd()

End a tag.

em This em(Str? attrs := null)

Start a tag.

emEnd This emEnd()

End a 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 := null)

Write a complete 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 := null)

Start a tag.

footerEnd This footerEnd()

End a tag.

form This form(Str? attrs := null)

Start a tag.

formEnd This formEnd()

End a tag.

h1 This h1(Str? attrs := null)

Start a tag.

h1End This h1End()

End a tag.

h2 This h2(Str? attrs := null)

Start a tag.

h2End This h2End()

End a tag.

h3 This h3(Str? attrs := null)

Start a tag.

h3End This h3End()

End a tag.

h4 This h4(Str? attrs := null)

Start a tag.

h4End This h4End()

End a tag.

h5 This h5(Str? attrs := null)

Start a tag.

h5End This h5End()

End a tag.

h6 This h6(Str? attrs := null)

Start a tag.

h6End This h6End()

End a tag.

head This head()

Start a tag.

headEnd This headEnd()

End a tag.

header This header(Str? attrs := null)

Start a tag.

headerEnd This headerEnd()

End a tag.

hidden This hidden(Str? attrs := null)

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

hr This hr(Str? attrs := null)

Write out a complete tag.

html This html()

Start a tag.

htmlEnd This htmlEnd()

End a tag.

i This i(Str? attrs := null)

Start a tag.

iEnd This iEnd()

End a tag.

img This img(Uri src, Str? attrs := null)

Write a complete tag.

includeCss This includeCss(Uri href)

Write a complete 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 := null)

Write a complete 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 := null)

Write a complete tag.

label This label(Str? attrs := null)

Start a tag.

labelEnd This labelEnd()

End a tag.

li This li(Str? attrs := null)

Start a tag.

liEnd This liEnd()

End a tag.

main This main(Str? attrs := null)

Start a tag.

mainEnd This mainEnd()

End a tag.

make new make(OutStream out)

Construct a WebOutStream that wraps the given OutStream.

nav This nav(Str? attrs := null)

Start a tag.

navEnd This navEnd()

End a tag.

nl This nl()

Convenience for writeChar(\n).

ol This ol(Str? attrs := null)

Start a tag.

olEnd This olEnd()

End a tag.

option This option(Str? attrs := null)

Start a tag.

optionEnd This optionEnd()

End a tag.

p This p(Str? attrs := null)

Start a tag.

pEnd This pEnd()

End a tag.

password This password(Str? attrs := null)

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

pre This pre(Str? attrs := null)

Start a tag.

preEnd This preEnd()

End a tag.

prolog This prolog()

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

radio This radio(Str? attrs := null)

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

rss This rss(Uri href, Str? attrs := null)

Write a complete tag for a RSS feed resource.

script This script(Str? attrs := "type='text/javascript'")

Start a tag.

scriptEnd This scriptEnd()

End a tag.

section This section(Str? attrs := null)

Start a tag.

sectionEnd This sectionEnd()

End a tag.

select This select(Str? attrs := null)

Start a tag.

selectEnd This selectEnd()

End a tag.

span This span(Str? attrs := null)

Start a tag.

spanEnd This spanEnd()

End a tag.

style This style(Str? attrs := "type='text/css'")

Start a tag.

styleEnd This styleEnd()

End a tag.

submit This submit(Str? attrs := null)

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

tab This tab(Int numSpaces := 2)

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

table This table(Str? attrs := null)

Start a tag.

tableEnd This tableEnd()

End a tag.

tag This tag(Str elemName, Str? attrs := null, Bool empty := false)

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 := null)

Start a tag.

tbodyEnd This tbodyEnd()

End a tag.

td This td(Str? attrs := null)

Start a tag.

tdEnd This tdEnd()

End a tag.

textArea This textArea(Str? attrs := null)

Start a tag.

textAreaEnd This textAreaEnd()

End a tag.

textField This textField(Str? attrs := null)

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

tfoot This tfoot(Str? attrs := null)

Start a tag.

tfootEnd This tfootEnd()

End a tag.

th This th(Str? attrs := null)

Start a tag.

thEnd This thEnd()

End a tag.

thead This thead(Str? attrs := null)

Start a tag.

theadEnd This theadEnd()

End a tag.

title This title(Str? attrs := null)

Write a complete tag.

titleEnd This titleEnd()

End a tag.

tr This tr(Str? attrs := null)

Start a tag.

trEnd This trEnd()

End a tag.

ul This ul(Str? attrs := null)

Start a tag.

ulEnd This ulEnd()

End a tag.

w This w(Obj? obj)

Convenience for writeChars(obj.toStr).

Haxall 4.0.6 ∙ 21-Jul-2026 09:48 EDT