- Index
- »
- fan.web
- »
- WebOutStream
WebOutStream
@Js
class WebOutStream : OutStream
WebOutStream provides methods for generating XML and XHTML content.
Construct a WebOutStream that wraps the given OutStream
Start a tag
End a tag
Start a tag
End a tag
Start a tag
End a tag
Write a complete tag for an Atom feed resource
Start a tag
End a tag
Start a tag
End a tag
Write out a complete tag
Convenience for input("type='button'" + attrs)
Convenience for input("type='checkbox'" + attrs)
Start a tag
End a tag
Start a tag
End a tag
Start a tag
End a tag
Start a tag
End a tag
Write the XHTML Strict DOCTYPE
Write the HTML5 DOCTYPE
Start a tag
End a tag
Start a tag
End a tag
Write obj.toStr to the stream as valid XML text
Write a complete tag for a favicon
Start a tag
End a tag
Start a tag
End a tag
Start a tag
End a tag
Start a tag
End a tag
Start a tag
End a tag
Start a tag
End a tag
Start a tag
End a tag
Start a tag
End a tag
Start a tag
End a tag
Start a tag
End a tag
Convenience for input("type='hidden'" + attrs)
Write out a complete tag
Start a tag
End a tag
Start a tag
End a tag
Write a complete tag
Write a complete tag for an external CSS stylesheet
Write a complete tag for an external JavaScript file
Customize how the JavaScript runtime environment is initialized
Write a complete tag
Start a tag
End a tag
Start a tag
End a tag
Start a tag
End a tag
Start a tag
End a tag
Convenience for writeChar(\n)
Start a tag
End a tag
Start a tag
End a tag
Start a tag
End a tag
Convenience for input("type='password'" + attrs)
Start a tag
End a tag
Write out a prolog statement using the streams current charset encoding
Convenience for input("type='radio'" + attrs)
Write a complete tag for a RSS feed resource
Start a tag
End a tag
Start a tag
End a tag
Start a tag
End a tag
Start a tag
End a tag
Start a tag
End a tag
Convenience for input("type='submit'" + attrs)
Convenience for writeChars(Str.spaces(numSpaces))
Start a tag
End a tag
Write a start tag
Write an end tag
Start a tag
End a tag
Start a tag
End a tag
Start a tag
End a tag
Convenience for input("type='text'" + attrs)
Start a tag
End a tag
Start a tag
End a tag
Start a tag
End a tag
Write a complete tag
End a tag
Start a tag
End a tag
Start a tag
End a tag
Convenience for writeChars(obj.toStr)
This a(Uri href, Str? attrs := null)
Start a tag.
This aEnd()
End a tag.
This article(Str? attrs := null)
Start a tag.
This articleEnd()
End a tag.
This aside(Str? attrs := null)
Start a tag.
This asideEnd()
End a tag.
This atom(Uri href, Str? attrs := null)
Write a complete tag for an Atom feed resource.
This b(Str? attrs := null)
Start a tag.
This bEnd()
End a tag.
This body(Str? attrs := null)
Start a tag.
This bodyEnd()
End a tag.
This br()
Write out a complete tag.
This button(Str? attrs := null)
Convenience for input("type='button'" + attrs).
This checkbox(Str? attrs := null)
Convenience for input("type='checkbox'" + attrs)
This code(Str? attrs := null)
Start a tag.
This codeEnd()
End a tag.
This dd(Str? attrs := null)
Start a tag.
This ddEnd()
End a tag.
This div(Str? attrs := null)
Start a tag.
This divEnd()
End a tag.
This dl(Str? attrs := null)
Start a tag.
This dlEnd()
End a tag.
This docType()
Write the XHTML Strict DOCTYPE.
This docType5()
Write the HTML5 DOCTYPE.
This dt(Str? attrs := null)
Start a tag.
This dtEnd()
End a tag.
This em(Str? attrs := null)
Start a tag.
This emEnd()
End a tag.
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.
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'")
This footer(Str? attrs := null)
Start a tag.
This footerEnd()
End a tag.
This form(Str? attrs := null)
Start a tag.
This formEnd()
End a tag.
This h1(Str? attrs := null)
Start a tag.
This h1End()
End a tag.
This h2(Str? attrs := null)
Start a tag.
This h2End()
End a tag.
This h3(Str? attrs := null)
Start a tag.
This h3End()
End a tag.
This h4(Str? attrs := null)
Start a tag.
This h4End()
End a tag.
This h5(Str? attrs := null)
Start a tag.
This h5End()
End a tag.
This h6(Str? attrs := null)
Start a tag.
This h6End()
End a tag.
This head()
Start a tag.
This headEnd()
End a tag.
This header(Str? attrs := null)
Start a tag.
This headerEnd()
End a tag.
This hidden(Str? attrs := null)
Convenience for input("type='hidden'" + attrs).
This hr(Str? attrs := null)
Write out a complete tag.
This html()
Start a tag.
This htmlEnd()
End a tag.
This i(Str? attrs := null)
Start a tag.
This iEnd()
End a tag.
This img(Uri src, Str? attrs := null)
Write a complete tag.
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.
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.
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. Themainargument can be either a type or method. If no method is specified,mainis 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()
This input(Str? attrs := null)
Write a complete tag.
This label(Str? attrs := null)
Start a tag.
This labelEnd()
End a tag.
This li(Str? attrs := null)
Start a tag.
This liEnd()
End a tag.
This main(Str? attrs := null)
Start a tag.
This mainEnd()
End a tag.
new make(OutStream out)
Construct a WebOutStream that wraps the given OutStream.
This nav(Str? attrs := null)
Start a tag.
This navEnd()
End a tag.
This nl()
Convenience for writeChar(\n).
This ol(Str? attrs := null)
Start a tag.
This olEnd()
End a tag.
This option(Str? attrs := null)
Start a tag.
This optionEnd()
End a tag.
This p(Str? attrs := null)
Start a tag.
This pEnd()
End a tag.
This password(Str? attrs := null)
Convenience for input("type='password'" + attrs).
This pre(Str? attrs := null)
Start a tag.
This preEnd()
End a tag.
This prolog()
Write out a prolog statement using the streams current charset encoding.
This radio(Str? attrs := null)
Convenience for input("type='radio'" + attrs)
This rss(Uri href, Str? attrs := null)
Write a complete tag for a RSS feed resource.
This script(Str? attrs := "type='text/javascript'")
Start a tag.
This scriptEnd()
End a tag.
This section(Str? attrs := null)
Start a tag.
This sectionEnd()
End a tag.
This select(Str? attrs := null)
Start a tag.
This selectEnd()
End a tag.
This span(Str? attrs := null)
Start a tag.
This spanEnd()
End a tag.
This style(Str? attrs := "type='text/css'")
Start a tag.
This styleEnd()
End a tag.
This submit(Str? attrs := null)
Convenience for input("type='submit'" + attrs).
This tab(Int numSpaces := 2)
Convenience for writeChars(Str.spaces(numSpaces)).
This table(Str? attrs := null)
Start a tag.
This tableEnd()
End a 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.
This tagEnd(Str elemName)
Write an end tag.
This tbody(Str? attrs := null)
Start a tag.
This tbodyEnd()
End a tag.
This td(Str? attrs := null)
Start a tag.
This tdEnd()
End a tag.
This textArea(Str? attrs := null)
Start a tag.
This textAreaEnd()
End a tag.
This textField(Str? attrs := null)
Convenience for input("type='text'" + attrs).
This tfoot(Str? attrs := null)
Start a tag.
This tfootEnd()
End a tag.
This th(Str? attrs := null)
Start a tag.
This thEnd()
End a tag.
This thead(Str? attrs := null)
Start a tag.
This theadEnd()
End a tag.
This title(Str? attrs := null)
Write a complete tag.
This titleEnd()
End a tag.
This tr(Str? attrs := null)
Start a tag.
This trEnd()
End a tag.
This ul(Str? attrs := null)
Start a tag.
This ulEnd()
End a tag.
This w(Obj? obj)
Convenience for writeChars(obj.toStr).