File tree Expand file tree Collapse file tree 1 file changed +29
-0
lines changed Expand file tree Collapse file tree 1 file changed +29
-0
lines changed Original file line number Diff line number Diff line change @@ -33,8 +33,37 @@ Include HTML tag (e.g. ```<my-button id='button'></my-button>)``` in any time of
3333You also take advantage of features like lazy-loading, that allows for loading components on demand, only when user add them to document
3434
3535## Introduction
36+
3637A basic element definition looks like this:
3738
39+ ``` javascript
40+ JQX (' smart-test' , class TestElement extends Smart .BaseElement {
41+ // properties.
42+ static get properties () {
43+ return {
44+ ' content' : {
45+ type: ' string'
46+ }
47+ };
48+ }
49+
50+ /** Element's template. */
51+ template () {
52+ return ' <div inner-h-t-m-l=\' [[innerHTML]]\' ></div>' ;
53+ }
54+
55+ ready () {
56+ super .ready ();
57+ }
58+
59+ propertyChangedHandler (propertyName , oldValue , newValue ) {
60+ super .propertyChangedHandler (propertyName, oldValue, newValue);
61+ }
62+ });
63+ ```
64+
65+ An extended element definition looks like this:
66+
3867``` javascript
3968Smart (' smart-button' , class Button extends Smart .ContentElement {
4069// Button's properties.
You can’t perform that action at this time.
0 commit comments