Reference Source
public class | source

Dom

Extends:

devapt-core-common/dist/js/base/stateable~Stateable → Dom

Direct Subclass:

Component, RenderedDDom

Constructor Summary

Public Constructor
public

constructor(arg_runtime: RuntimeBase, arg_state: Immutable.Map, arg_log_context: string): nothing

Creates an instance of Component.

Member Summary

Public Members
public
Private Members
private
private

_name: *

private
private

Method Summary

Public Methods
public

clear_dom_text(): nothing

DOM element manipulation:clear dom element text value.

public

clear_dom_value(): nothing

DOM element manipulation:clear dom element value.

public

get_dom_attr(arg_attr_name: string): string

DOM element manipulation:get dom element attribute.

public

get_dom_element(): Element

Get DOM element.

public

Get DOM id.

public

get_dom_parent(): Element

Get parent element.

public

DOM element manipulation:get dom element text.

public

DOM element manipulation:get dom element value.

public

get_dom_vnode(): VNode

Get DOM Virtual Node.

public

Get name.

public

Test DOM Element instance.

public

has_dom_parent(arg_element: Element): boolean

Test if component element has given parent element.

public

Test DOM Virtual Node.

public

hide(): nothing

Hide component.

public

is_visible(arg_check: boolean): boolean

Get visibility.

public

on_dom_event(arg_dom_event: *, arg_dom_selector: *, arg_handler: *, arg_data: *, arg_debug: boolean): nothing

Mount dom event handler.

public

set_dom_attr(arg_attr_name: string, arg_attr_value: string): nothing

DOM element manipulation:set dom element attribute value.

public

set_dom_element(arg_element: Element): nothing

Set DOM element.

public

set_dom_parent(arg_parent_element: Element): nothing

Set given parent element.

public

set_dom_parent_of(arg_component: Component): nothing

Set given parent element.

public

set_dom_text(arg_text_value: string): nothing

DOM element manipulation:set dom element text value.

public

set_dom_value(arg_value: string): nothing

DOM element manipulation:set dom element value.

public

set_dom_vnode(arg_vnode: VNode): nothing

Set DOM Virtual Node.

public

show(): nothing

Show component.

public

toggle(): nothing

Toggle component visbility.

Private Methods
private

_get_dom_text(arg_element: *): *

Public Constructors

public constructor(arg_runtime: RuntimeBase, arg_state: Immutable.Map, arg_log_context: string): nothing source

Creates an instance of Component.

Params:

NameTypeAttributeDescription
arg_runtime RuntimeBase

client runtime.

arg_state Immutable.Map

component initial state.

arg_log_context string

context of traces of this instance (optional).

Return:

nothing

Public Members

public is_dom: boolean source

Private Members

private _is_visible: boolean source

private _name: * source

private _rendering: * source

private _visiblility: * source

Public Methods

public clear_dom_text(): nothing source

DOM element manipulation:clear dom element text value.

Return:

nothing

public clear_dom_value(): nothing source

DOM element manipulation:clear dom element value.

Return:

nothing

public get_dom_attr(arg_attr_name: string): string source

DOM element manipulation:get dom element attribute.

Params:

NameTypeAttributeDescription
arg_attr_name string

dom attribute name.

Return:

string

public get_dom_element(): Element source

Get DOM element.

Return:

Element

public get_dom_id(): string source

Get DOM id.

Return:

string

component DOM id.

public get_dom_parent(): Element source

Get parent element.

Return:

Element

parent element.

public get_dom_text(): string source

DOM element manipulation:get dom element text.

Return:

string

public get_dom_value(): string source

DOM element manipulation:get dom element value.

Return:

string

public get_dom_vnode(): VNode source

Get DOM Virtual Node.

Return:

VNode

public get_name(): string source

Get name.

Return:

string

component name.

public has_dom_element(): boolean source

Test DOM Element instance.

Return:

boolean

public has_dom_parent(arg_element: Element): boolean source

Test if component element has given parent element.

Params:

NameTypeAttributeDescription
arg_element Element

parent element to test.

Return:

boolean

public has_dom_vnode(): boolean source

Test DOM Virtual Node.

Return:

boolean

public hide(): nothing source

Hide component.

Return:

nothing

public is_visible(arg_check: boolean): boolean source

Get visibility.

Params:

NameTypeAttributeDescription
arg_check boolean

if true, check style display value.

Return:

boolean

public on_dom_event(arg_dom_event: *, arg_dom_selector: *, arg_handler: *, arg_data: *, arg_debug: boolean): nothing source

Mount dom event handler.

@{string} arg_dom_event - dom event name. @{string} arg_dom_selector - dom selector string ('tag_name.class1.class2'). @{function} arg_handler - handler function f(component, event name, selection, event, target). @{any} arg_data - handler datas, default undefined (optional). @{boolean} arg_debug - trace flag, default true (optional).

Params:

NameTypeAttributeDescription
arg_dom_event *
arg_dom_selector *
arg_handler *
arg_data *
  • optional
  • default: undefined
arg_debug boolean
  • optional
  • default: true

Return:

nothing

public set_dom_attr(arg_attr_name: string, arg_attr_value: string): nothing source

DOM element manipulation:set dom element attribute value.

Params:

NameTypeAttributeDescription
arg_attr_name string

dom attribute name.

arg_attr_value string

dom attribute value.

Return:

nothing

public set_dom_element(arg_element: Element): nothing source

Set DOM element.

Params:

NameTypeAttributeDescription
arg_element Element

element instance.

Return:

nothing

public set_dom_parent(arg_parent_element: Element): nothing source

Set given parent element.

Params:

NameTypeAttributeDescription
arg_parent_element Element

parent element.

Return:

nothing

public set_dom_parent_of(arg_component: Component): nothing source

Set given parent element.

Params:

NameTypeAttributeDescription
arg_component Component

parent element component.

Return:

nothing

public set_dom_text(arg_text_value: string): nothing source

DOM element manipulation:set dom element text value.

Params:

NameTypeAttributeDescription
arg_text_value string

dom text value.

Return:

nothing

public set_dom_value(arg_value: string): nothing source

DOM element manipulation:set dom element value.

Params:

NameTypeAttributeDescription
arg_value string

dom value.

Return:

nothing

public set_dom_vnode(arg_vnode: VNode): nothing source

Set DOM Virtual Node.

Params:

NameTypeAttributeDescription
arg_vnode VNode

VNode instance.

Return:

nothing

public show(): nothing source

Show component.

Return:

nothing

public toggle(): nothing source

Toggle component visbility.

Return:

nothing

Private Methods

private _get_dom_text(arg_element: *): * source

Params:

NameTypeAttributeDescription
arg_element *

Return:

*