This is a html web component to render html by using defaultjs-template-language.
npm install @default-js/defaultjs-html-rendererjavascript
//import html renderer element
import { HTMLRendererElement } from "@default-js/defaultjs-html-renderer"
`
Script Tag
`html
...
//script file is located at dist directory
`
How to use
Include the d-renderer tag into your html body and
- define the path to a template by attribute template.
- define a selector of a HTMLTemplateElement by attribute template.
- define a template as content of d-renderer.
`html
`
Overview of all Attributes
Attribute | Default | Description
-----------------|-----------|---------
template | | URL string or dom selector string
render-mode | replace | Defines, how the rendered content be included. Values [append, prepend, replace, self-replace]
data | | URL string to load additional data
condition | | define an Expression, under what condition the renderer would be executed
initial-run | true | if the value false, you must execute the rendering by javascript or by an Event <- see other attributes
include-only | | if this attribute präsent, then the renderer would include the template without processing
listen-event | | define an Event, if this Event triggert the renderer would be executed. Combine this with initial-run=false
listen-element | | define a dom selector string on witch element an event be observed
trigger-event | | define an Event there be triggered if the rendering process finished
`html
`
How do define a template
If you want to learn, "How to define a template?"`, read the documentation of defaultjs-template-language.