add StateFunction to README

This commit is contained in:
lucaspalomodevelop 2022-10-31 18:05:31 +01:00
parent dab7c7e78e
commit 347e83f7f6

View File

@ -72,6 +72,17 @@ let result = Jsste.render(pagecode, templatecode);
- `_TEMPLATE_` -> Defines the path to the temp file
- `_STYLES_` -> Defines a list of CSS files that will be implemented
### Include States
You can include an Callbackfunction that will be called when the state is change
```javascript
jsste.setStateFunction(({ status, statusMSG }) => {
yourstatus = status;
yourstatusMSG = statusMSG;
});
```
### States-Codes
| Code | Meaning |