Zebra API Doc

zebra.ui.HtmlElement Class

Extends zebra.ui.Panel

HTML element UI component wrapper class. The class represents an HTML element as if it is standard UI component. It helps to use some standard HTML element as zebra UI components and embeds it in zebra UI application layout.

Constructor

zebra.ui.HtmlElement

(
  • [element]
)

Parameters:

  • [element] String | HTMLElement optional

    an HTML element to be represented as a standard zebra UI component. If the passed parameter is string it denotes a name of an HTML element. In this case a new HTML element will be created.

Methods

setAttribute

(
  • name
  • value
)

Set the specified attribute of the wrapped HTML element

Parameters:

  • name String

    a name of attribute

  • value String

    a value of the attribute

setColor

(
  • c
)

Set the CSS color of the wrapped HTML element

Parameters:

  • c String

    a color

setContent

(
  • an
)

Set the inner content of the wrapped HTML element

Parameters:

  • an String

    inner content

setFont

(
  • f
)

Set the CSS font of the wrapped HTML element

Parameters:

setStyle

(
  • a
  • a
)

Apply the given CSS style to the wrapped HTML element

Parameters:

  • a String

    name of the CSS style

  • a String

    value the CSS style has to be set

setStyles

(
  • styles
)

Apply the given set of CSS styles to the wrapped HTML element

Parameters:

  • styles Object

    a dictionary of CSS styles

Attributes

element

HTMLElement readonly

Reference to HTML element the UI component wraps