import RenderingResult from 'devapt-core-common/js/rendering/rendering_result.js'
RenderingResult
Constructor Summary
Public Constructor | ||
public |
constructor(): nothing Create RenderingResult instance. |
Member Summary
Public Members | ||
public |
body_scripts_tags: *[] |
|
public |
body_scripts_urls: *[] |
|
public |
body_styles_tags: *[] |
|
public |
body_styles_urls: *[] |
|
public |
head_links_urls: *[] |
|
public |
head_scripts_tags: *[] |
|
public |
head_scripts_urls: *[] |
|
public |
head_styles_tags: *[] |
|
public |
head_styles_urls: *[] |
|
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 tag. |
|
public |
add_result(arg_result: RenderingResult, arg_merge_vnodes: boolean): nothing Merge RenderingResult instances. |
|
public |
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 code for an existing vtree. |
|
public |
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_links_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 uid: * source
public vtrees: {} source
Public Methods
public add_body_scripts_tags(arg_tags: array): * source
Add body scripts tags.
Params:
Name | Type | Attribute | Description |
arg_tags | array | scripts tags strings array. |
Return:
* | {nothing}. |
public add_body_scripts_urls(arg_urls: array): * source
Add body scripts urls.
Params:
Name | Type | Attribute | Description |
arg_urls | array | scripts urls strings array. |
Return:
* | {nothing}. |
public add_head_scripts_tags(arg_tags: array): * source
Add header scripts tags.
Params:
Name | Type | Attribute | Description |
arg_tags | array | scripts tags strings array. |
Return:
* | {nothing}. |
public add_head_scripts_urls(arg_urls: array): * source
Add header scripts urls.
Params:
Name | Type | Attribute | Description |
arg_urls | array | scripts urls strings array. |
Return:
* | {nothing}. |
public add_head_styles_tags(arg_tags: array): * source
Add header styles tags.
Params:
Name | Type | Attribute | Description |
arg_tags | array | styles tags strings array. |
Return:
* | {nothing}. |
public add_head_styles_urls(arg_urls: array): * source
Add header styles urls.
Params:
Name | Type | Attribute | Description |
arg_urls | array | styles urls strings array. |
Return:
* | {nothing}. |
public add_result(arg_result: RenderingResult, arg_merge_vnodes: boolean): nothing source
Merge RenderingResult instances.
Params:
Name | Type | Attribute | Description |
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:
Name | Type | Attribute | Description |
arg_tag_id | string | tag id string. |
|
arg_vtree | VNode | virtual-dom virtual tree. |
Return:
* | {nothing}. |
public get_final_html(arg_final_id: string | undefined, arg_parent_result: RenderingResult): string source
Get Html code for an existing vtree.
Params:
Name | Type | Attribute | Description |
arg_final_id | string | undefined | final tree id (optional). |
|
arg_parent_result | RenderingResult | parent result to merge assets into (optional). |
public get_final_vtree(arg_final_id: string | undefined, arg_parent_result: RenderingResult): VNode source
Get final VTree.
Params:
Name | Type | Attribute | Description |
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:
Name | Type | Attribute | Description |
arg_id | string | element id. |
public get_vtree(arg_id: string): VTree source
Get existing VTree instance.
Params:
Name | Type | Attribute | Description |
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:
Name | Type | Attribute | Description |
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:
Name | Type | Attribute | Description |
arg_tag_id | string | tag id string. |
Return:
* | {nothing}. |
public set_headers(set_headers: array): * source
Set headers.
Params:
Name | Type | Attribute | Description |
set_headers | array | headers strings array. |
Return:
* | {nothing}. |