Introduced properties

private var _content: String

html :: HTMLRaw :: _content

private fun content: String

html :: HTMLRaw :: content

private fun content=(content: String)

html :: HTMLRaw :: content=

init defaultinit(tag: String, content: String)

html :: HTMLRaw :: defaultinit

Redefined properties

redef type SELF: HTMLRaw

html $ HTMLRaw :: SELF

Type of this instance, automatically specialized in every class
redef fun write_to(stream: Writer)

html $ HTMLRaw :: write_to

Write itself to a stream

All properties

fun !=(other: nullable Object): Bool

core :: Object :: !=

Have self and other different values?
fun ==(other: nullable Object): Bool

core :: Object :: ==

Have self and other the same value?
type CLASS: Class[SELF]

core :: Object :: CLASS

The type of the class of self.
type SELF: Object

core :: Object :: SELF

Type of this instance, automatically specialized in every class
private var _attrs: Map[String, String]

html :: HTMLTag :: _attrs

Tag attributes map
private var _children: Array[HTMLTag]

html :: HTMLTag :: _children

List of children HTML elements
private var _classes: Set[String]

html :: HTMLTag :: _classes

CSS classes
private var _content: String

html :: HTMLRaw :: _content

private var _css_props: Map[String, String]

html :: HTMLTag :: _css_props

private var _is_void: Bool

html :: HTMLTag :: _is_void

Is the HTML element a void element?
private var _tag: String

html :: HTMLTag :: _tag

HTML element type.
fun add(child: HTMLTag): HTMLTag

html :: HTMLTag :: add

Add a HTML 'child' to self
fun add_class(klass: String): HTMLTag

html :: HTMLTag :: add_class

Add a CSS class to the HTML tag
fun add_classes(classes: Collection[String]): HTMLTag

html :: HTMLTag :: add_classes

Add multiple CSS classes
fun add_outer(parent: HTMLTag)

html :: HTMLTag :: add_outer

Replace self by parent.
fun add_raw_html(txt: String): HTMLTag

html :: HTMLTag :: add_raw_html

Append raw HTML to element
fun append(txt: String): HTMLTag

html :: HTMLTag :: append

Append text to element
fun attach_infobox(infobox: HInfoBox)

html :: HTMLTag :: attach_infobox

Attach the infobox to the node by using BootStrap popover
fun attr(key: String, value: String): HTMLTag

html :: HTMLTag :: attr

Set a 'value' for 'key'
fun attrs: Map[String, String]

html :: HTMLTag :: attrs

Tag attributes map
protected fun attrs=(attrs: Map[String, String])

html :: HTMLTag :: attrs=

Tag attributes map
fun children: Array[HTMLTag]

html :: HTMLTag :: children

List of children HTML elements
protected fun children=(children: Array[HTMLTag])

html :: HTMLTag :: children=

List of children HTML elements
protected fun class_factory(name: String): CLASS

core :: Object :: class_factory

Implementation used by get_class to create the specific class.
fun class_name: String

core :: Object :: class_name

The class name of the object.
fun classes: Set[String]

html :: HTMLTag :: classes

CSS classes
protected fun classes=(classes: Set[String])

html :: HTMLTag :: classes=

CSS classes
private fun content: String

html :: HTMLRaw :: content

private fun content=(content: String)

html :: HTMLRaw :: content=

fun css(prop: String, value: String): HTMLTag

html :: HTMLTag :: css

Set a CSS 'value' for 'prop'
private fun css_props: Map[String, String]

html :: HTMLTag :: css_props

private fun css_props=(css_props: Map[String, String])

html :: HTMLTag :: css_props=

init defaultinit(tag: String, content: String)

html :: HTMLRaw :: defaultinit

fun get_attr(key: String): nullable String

html :: HTMLTag :: get_attr

Get the attributed value of 'prop' or null if 'prop' is undifened
fun get_class: CLASS

core :: Object :: get_class

The meta-object representing the dynamic type of self.
fun get_css(prop: String): nullable String

html :: HTMLTag :: get_css

Get CSS value for 'prop'
fun hash: Int

core :: Object :: hash

The hash code of the object.
init init

core :: Object :: init

fun inspect: String

core :: Object :: inspect

Developer readable representation of self.
protected fun inspect_head: String

core :: Object :: inspect_head

Return "CLASSNAME:#OBJECTID".
intern fun is_same_instance(other: nullable Object): Bool

core :: Object :: is_same_instance

Return true if self and other are the same instance (i.e. same identity).
fun is_same_serialized(other: nullable Object): Bool

core :: Object :: is_same_serialized

Is self the same as other in a serialization context?
intern fun is_same_type(other: Object): Bool

core :: Object :: is_same_type

Return true if self and other have the same dynamic type.
fun is_void: Bool

html :: HTMLTag :: is_void

Is the HTML element a void element?
protected fun is_void=(is_void: Bool)

html :: HTMLTag :: is_void=

Is the HTML element a void element?
private intern fun native_class_name: CString

core :: Object :: native_class_name

The class name of the object in CString format.
intern fun object_id: Int

core :: Object :: object_id

An internal hash code for the object based on its identity.
fun open(tag: String): HTMLTag

html :: HTMLTag :: open

Create a new HTMLTag child and return it
fun output

core :: Object :: output

Display self on stdout (debug only).
intern fun output_class_name

core :: Object :: output_class_name

Display class name on stdout (debug only).
private fun render_attrs_in(stream: Writer)

html :: HTMLTag :: render_attrs_in

fun serialization_hash: Int

core :: Object :: serialization_hash

Hash value use for serialization
intern fun sys: Sys

core :: Object :: sys

Return the global sys object, the only instance of the Sys class.
fun tag: String

html :: HTMLTag :: tag

HTML element type.
protected fun tag=(tag: String)

html :: HTMLTag :: tag=

HTML element type.
fun text(txt: String): HTMLTag

html :: HTMLTag :: text

Clear all child and set the text of element
abstract fun to_jvalue(env: JniEnv): JValue

core :: Object :: to_jvalue

fun to_s: String

core :: Object :: to_s

User readable representation of self.
private fun void_list: Set[String]

html :: HTMLTag :: void_list

init with_attrs(tag: String, attrs: Map[String, String])

html :: HTMLTag :: with_attrs

Create a HTML elements with the specifed type and attributes.
abstract fun write_to(stream: Writer)

core :: Writable :: write_to

Write itself to a stream
fun write_to_bytes: Bytes

core :: Writable :: write_to_bytes

Like write_to but return a new Bytes (may be quite large)
fun write_to_file(filepath: String)

core :: Writable :: write_to_file

Like write_to but take care of creating the file
fun write_to_string: String

core :: Writable :: write_to_string

Like write_to but return a new String (may be quite large).
package_diagram html::html::HTMLRaw HTMLRaw html::HTMLTag HTMLTag html::html::HTMLRaw->html::HTMLTag core::Writable Writable html::HTMLTag->core::Writable ...core::Writable ... ...core::Writable->core::Writable

Ancestors

interface Object

core :: Object

The root of the class hierarchy.
interface Writable

core :: Writable

Things that can be efficienlty written to a Writer

Parents

class HTMLTag

html :: HTMLTag

An HTML element.

Class definitions

html $ HTMLRaw
private class HTMLRaw
	super HTMLTag

	var content: String
	redef fun write_to(stream) do stream.write content
end
lib/html/html.nit:348,1--353,3