Reference Source
public class | source

RenderingResult

Constructor Summary

Public Constructor
public

constructor(): nothing

Create RenderingResult instance.

Member Summary

Public Members
public
public
public
public
public
public
public
public
public
public

headers: *[]

public
public

uid: *

public

vtrees: {}

Method Summary

Public Methods
public

add_body_scripts_tags(arg_tags: array): *

Add body scripts tags.

public

add_body_scripts_urls(arg_urls: array): *

Add body scripts urls.

public

add_head_scripts_tags(arg_tags: array): *

Add header scripts tags.

public

add_head_scripts_urls(arg_urls: array): *

Add header scripts urls.

public

add_head_styles_tags(arg_tags: array): *

Add header styles tags.

public

add_head_styles_urls(arg_urls: array): *

Add header styles urls.

public

add_html(arg_tag_id: string, arg_html: string): *

Add Html tag.

public

add_result(arg_result: RenderingResult, arg_merge_vnodes: boolean): nothing

Merge RenderingResult instances.

public

add_vtree(arg_tag_id: string, arg_vtree: VNode): *

Add a VTree instance.

public

Convert all VNode to json objects.

public

Convert all VNode to json objects.

public

get_final_html(arg_final_id: string | undefined, arg_parent_result: RenderingResult): string

Get Html code for an existing vtree.

public

get_final_vtree(arg_final_id: string | undefined, arg_parent_result: RenderingResult): VNode

Get final VTree.

public

get_html(arg_id: string): string

Get Html code for an existing vtree.

public

get_vtree(arg_id: string): VTree

Get existing VTree instance.

public

get_vtree_json(arg_tag_id: string, arg_vtree: VNode): *

Get an existing VTree as Json.

public

remove_vtree(arg_tag_id: string): *

Remove a VTree instance.

public

set_headers(set_headers: array): *

Set headers.

Public Constructors

public constructor(): nothing source

Create RenderingResult instance.

API: ->constructor():nothing - create an empty rendering result instance.

    ->add_result(arg_result, arg_merge_vnodes=true):nothing - merge RenderingResult instances.

    ->add_html(arg_tag_id, arg_html):nothing - take Html text and convert it to a virtual tree.
    ->add_vtree(arg_tag_id, arg_vtree):nothing - add a virtual tree.
    ->remove_vtree(arg_tag_id):nothing - remove a virtual tree.

    ->get_vtree_json(arg_tag_id):VTree - get an existing VTree as Json.
    ->get_vtree(arg_id):VTree - get an existing VTree instance.
    ->get_html(arg_id)

    ->get_final_vtree(arg_final_id, arg_parent_result):VNode - get final VTree.
    ->get_final_html(arg_final_id, arg_parent_result):string - get Html code for an existing vtree.

    ->set_headers(arg_headers)

    ->add_head_scripts_urls(arg_urls)
    ->add_head_scripts_tags(arg_tags)

    ->add_body_scripts_urls(arg_urls)
    ->add_body_scripts_tags(arg_tags)

    ->add_head_styles_urls(arg_tags)
    ->add_head_styles_tags(arg_tags)

Return:

nothing

Public Members

public body_scripts_tags: *[] source

public body_scripts_urls: *[] source

public body_styles_tags: *[] source

public body_styles_urls: *[] source

public head_scripts_tags: *[] source

public head_scripts_urls: *[] source

public head_styles_tags: *[] source

public head_styles_urls: *[] source

public headers: *[] source

public is_rendering_result: boolean source

public uid: * source

public vtrees: {} source

Public Methods

public add_body_scripts_tags(arg_tags: array): * source

Add body scripts tags.

Params:

NameTypeAttributeDescription
arg_tags array

scripts tags strings array.

Return:

*

{nothing}.

public add_body_scripts_urls(arg_urls: array): * source

Add body scripts urls.

Params:

NameTypeAttributeDescription
arg_urls array

scripts urls strings array.

Return:

*

{nothing}.

public add_head_scripts_tags(arg_tags: array): * source

Add header scripts tags.

Params:

NameTypeAttributeDescription
arg_tags array

scripts tags strings array.

Return:

*

{nothing}.

public add_head_scripts_urls(arg_urls: array): * source

Add header scripts urls.

Params:

NameTypeAttributeDescription
arg_urls array

scripts urls strings array.

Return:

*

{nothing}.

public add_head_styles_tags(arg_tags: array): * source

Add header styles tags.

Params:

NameTypeAttributeDescription
arg_tags array

styles tags strings array.

Return:

*

{nothing}.

public add_head_styles_urls(arg_urls: array): * source

Add header styles urls.

Params:

NameTypeAttributeDescription
arg_urls array

styles urls strings array.

Return:

*

{nothing}.

public add_html(arg_tag_id: string, arg_html: string): * source

Add Html tag.

Params:

NameTypeAttributeDescription
arg_tag_id string

tag id string.

arg_html string

Html string.

Return:

*

{nothing}.

public add_result(arg_result: RenderingResult, arg_merge_vnodes: boolean): nothing source

Merge RenderingResult instances.

Params:

NameTypeAttributeDescription
arg_result RenderingResult

rendering result to add to this result.

arg_merge_vnodes boolean

flag to merge or not vnodes (default:true) (optional)

Return:

nothing

public add_vtree(arg_tag_id: string, arg_vtree: VNode): * source

Add a VTree instance.

Params:

NameTypeAttributeDescription
arg_tag_id string

tag id string.

arg_vtree VNode

virtual-dom virtual tree.

Return:

*

{nothing}.

public convert_from_json(): RenderingResult source

Convert all VNode to json objects.

Return:

RenderingResult

public convert_to_json(): RenderingResult source

Convert all VNode to json objects.

Return:

RenderingResult

public get_final_html(arg_final_id: string | undefined, arg_parent_result: RenderingResult): string source

Get Html code for an existing vtree.

Params:

NameTypeAttributeDescription
arg_final_id string | undefined

final tree id (optional).

arg_parent_result RenderingResult

parent result to merge assets into (optional).

Return:

string

public get_final_vtree(arg_final_id: string | undefined, arg_parent_result: RenderingResult): VNode source

Get final VTree.

Params:

NameTypeAttributeDescription
arg_final_id string | undefined

final tree id (optional).

arg_parent_result RenderingResult

parent result to merge assets into (optional).

Return:

VNode

public get_html(arg_id: string): string source

Get Html code for an existing vtree.

Params:

NameTypeAttributeDescription
arg_id string

element id.

Return:

string

public get_vtree(arg_id: string): VTree source

Get existing VTree instance.

Params:

NameTypeAttributeDescription
arg_id string

element id.

Return:

VTree

public get_vtree_json(arg_tag_id: string, arg_vtree: VNode): * source

Get an existing VTree as Json.

Params:

NameTypeAttributeDescription
arg_tag_id string

tag id string.

arg_vtree VNode

virtual-dom virtual tree.

Return:

*

{nothing}.

public remove_vtree(arg_tag_id: string): * source

Remove a VTree instance.

Params:

NameTypeAttributeDescription
arg_tag_id string

tag id string.

Return:

*

{nothing}.

public set_headers(set_headers: array): * source

Set headers.

Params:

NameTypeAttributeDescription
set_headers array

headers strings array.

Return:

*

{nothing}.